Ask coding questions

← Back to all posts
TCP Server Hosting Possible?
Highwayman

My code is fine, but whenever I attempt to run my server, it inexplicably exits with the words terminated without active exception, so I tried going to my site, and it gives me error 502, bad gateway error I looked into 502 further, and it looks like it’s saying it8s received bad data and not necessarily a vacant connection, so does that mean that I can’t host a TCP server straight up on repl.it?

Voters
Coder100
Highwayman
Comments
hotnewtop
Arrows12

use pagekite tcp it works on replit

MrEconomical

you don't get access to the tcp port on repl.it which is a big F

Highwayman

@MrEconomical yeah tbh I didn’t even try to, I just used 3000. :( I’m just desperately searching now lol. The thing about that is that you can’t use the http port either, so I’m just gonna try and connect with a tcp client on repl.it instead of my actual browser, I’m still super new to all this it’s waaay over my head I’d say. I’m guessing the only special port you can use https or no?

[deleted]

@Highwayman Port 3000 Gang, Rise Up!

Highwayman
devsimsek

@Highwayman How exactly you opened tcp?
Please help me.

Highwayman

TCP doesn't actually work on repl.it, so I didn't. If you're asking how to just make a socket in general, then that's pretty easy. I suggest looking up "Beej's guide to network programming", it really helped me out.
@devsimsek