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
>>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()
>>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.
>>51243089
>>51243130
Fuck my life, Thank you gentlemen
I've had a hundred tabs open overlooked this
>>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.
>>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#