[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Need some help in c# programming, I've created a tcp listener
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 11
Thread images: 6
File: CantConnect.png (311 KB, 3286x1200) Image search: [Google]
CantConnect.png
311 KB, 3286x1200
Need some help in c# programming, I've created a tcp listener to bind to my local ip and forwarded the relevant port on my router to allow it to accept incoming connection, but when i try to connect to the external ip it times out or just doesn't connect.

Anybody have any advice?
>>
>>51242854
send pics of View Detail window under the Actions tab of the exception handler
>>
File: details.png (49 KB, 1906x921) Image search: [Google]
details.png
49 KB, 1906x921
>>51242890
StackTrace


at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
at ChatClient.ChatClient.Main() in D:\Documents\000Programming\Basic_ClientServer_Chat\ChatServer\ChatClient\ChatClient.cs:line 70
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
>>
File: clientconnect.png (2 MB, 3286x1200) Image search: [Google]
clientconnect.png
2 MB, 3286x1200
>>51242918
and this is how the client connects
>>
Use IPAdress.Any on the TCPListener
>>
Since ur using GNU smash it up on github or host urself. Way easier to help
>>
>>51243089
^^ You know it

If you Have Logmein Hamashit or VMwarez it will listen on those crappy network interfaces instead.

Make sure you make the bind address 0.0.0.0 for the listener (or server) to listen on all interfaces.
>>
File: fixed.png (295 KB, 1187x402) Image search: [Google]
fixed.png
295 KB, 1187x402
>>51243089
>>51243130
Fuck my life, Thank you gentlemen

I've had a hundred tabs open overlooked this
>>
File: sshot-3263.png (7 KB, 595x125) Image search: [Google]
sshot-3263.png
7 KB, 595x125
>>51242918
IP port destination does not exist, thats why Connect throws Timeout exception (try interval finnished)
>>
>>51242854
Use internal IP address to connect instead of external IP, if you are using intra/local computer net.
>>
File: open.png (11 KB, 421x306) Image search: [Google]
open.png
11 KB, 421x306
>>51243188
probably had the server program closed at that point
>>51243201
I'm not specifically using this program for anything, I'm a budding Programmer really, just trying to learn socket programming in c#
Thread replies: 11
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.