![]() |
|
[.NET] how to make a global tcp server and client in c# - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] how to make a global tcp server and client in c# (/showthread.php?tid=5922313) |
how to make a global tcp server and client in c# - HardStoN - Dec 24, 2018 i wonder how can i make a tcp listener and client that can connect to the server even if we are in the different wifi. or if thing like that even exist with tcp listener and client or even something else. Thanks for helpers. RE: how to make a global tcp server and client in c# - gigajew - Dec 24, 2018 If you use udp instead, and listen on port 80 on your server, the client shouldn't get blocked by firewall :) RE: how to make a global tcp server and client in c# - Cyadrogen - Dec 24, 2018 (Dec 24, 2018 11:13 AM)HardStoN Wrote: i wonder how can i make a tcp listener and client that can connect to the server even if we are in the different wifi. Not a lot of info to go on. What server? Services running? you mentionned c#, any specific reason for it? In short: Yes you can connect to the internet (both TCP & UDP) by programming a c# program. Idk why that's even a question. The better question would be why should I not be using netcat and instead pain my life into re-inventing the wheel with a program, in a language that's not only bad but limited to windows (pretty much). tldr: netcat. just fucking use netcat. EDIT: I didn't got that you owned that server. You can just port forward any incoming port/protocol/ip's to the server if it's in your LAN, otherwise the server seller SHOULD provide info on how to do it on their end. (Dec 24, 2018 02:51 PM)gigajew Wrote: If you use udp instead, and listen on port 80 on your server, the client shouldn't get blocked by firewall :) How could you possibly know that? Do you own the server? What firewall is it running?? Thought so. RE: how to make a global tcp server and client in c# - itcorp - Dec 24, 2018 (Dec 24, 2018 03:01 PM)Cyadrogen Wrote: Not a lot of info to go on. What server? Services running? you mentionned c#, any specific reason for it? gigajew has directed the user HardStoN to lisen port 80 perhaps because the port 80 in most cases default port and firewall typically allow request over port 80 RE: how to make a global tcp server and client in c# - Cyadrogen - Dec 24, 2018 (Dec 24, 2018 04:09 PM)itcorp Wrote: gigajew has directed the user HardStoN to lisen port 80 perhaps because the port 80 in most cases detaful port and firewall typically allow request over port 80 Ok then, why not port 53? or 123? They're both vital to http (123 not so much but still people need time). The question I was asking though is why UDP? If op want's to write a client that reads tcp why would reading udp help in any way? Especially since udp and tcp is as similar as a far left and a far right iow not at all. RE: how to make a global tcp server and client in c# - itcorp - Dec 24, 2018 (Dec 24, 2018 04:25 PM)Cyadrogen Wrote: Ok then, why not port 53? or 123? They're both vital to http (123 not so much but still people need time). This now opens up another question if the user requires speed or safety,but if this app request big number of clients and manipulates with small packages udp is the choice otherwise I do not see why tcp would not be the primary choice. RE: how to make a global tcp server and client in c# - HardStoN - Dec 24, 2018 Hey guys thanks for the help but I dont think you guys got me. My question is how can other client from another country (not in the same wifi) can connect to my server. Thanks RE: how to make a global tcp server and client in c# - Nick (Name) - Dec 25, 2018 (Dec 24, 2018 10:57 PM)HardStoN Wrote: Hey guys thanks for the help but I dont think you guys got me. My question is how can other client from another country (not in the same wifi) can connect to my server. Forward a port from your router pointing to the machine’s IP address assigned by your router. |