Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6962521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:40:15+00:00 2026-05-27T15:40:15+00:00

I am trying to use this c socket class , but it only works

  • 0

I am trying to use this c socket class, but it only works when I use it on my own computer.

Desktop only

Server is started like this: cSocketServer -p:2030 -i:192.168.178.22

Client connects: cSocketclient -p:2030 -s:192.168.178.22

Works fine.

Desktop server, laptop client

Server: cSocketServer -p:2030 -i:192.168.178.22

Client: cSocketclient -p:2030 -s:192.168.178.22

Exact same as above, but this fires the connect failed: 10060 error. Which essentially means it timed out.

Desktop only (external address)

Server: cSocketServer -p:2030 -i:192.168.178.22

Client: cSocketclient -p:2030 -s:xx.xx.xx.xx

Where xx.xx.xx.xx is my external ip address.

Same error: connect failed: 10060. Port 2030 is definitely open and accessible, because I tested it with a few unrelated applications that allow their users to choose their own ports (like utorrent). While those run, whatismyip.org states port 2030 is open. But when I run my application it sais it Timed-out. Those applications do not have any special privileges in the firewall.

But even if I did mess up some firewall/router settings (which I’m fairly sure I didn’t) that wouldn’t explain why I can’t connect to the server from within my local network. Other services (such as file sharing) work fine so there is definitely a connection between the 2 computers.

Both client and server run on windows 7 64-bit.

Also; for some reason, each client that connects gets their own inbound port assigned or something? Is that normal? When clients connect the server states;

Accepted client: 192.168.178.22:55156
Accepted client: 192.168.178.22:55164
Accepted client: 192.168.178.22:55176

What’s that all about?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:40:16+00:00Added an answer on May 27, 2026 at 3:40 pm

    If two TCP connections have the same source IP, destination IP, source port, and destination port, there would be no way to tell them apart. To ensure they differ somewhere, clients typically assign a unique source port to every outbound connection they make.

    As for the errors, you really need to do some troubleshooting. Do the listening sockets show up in a ‘netstat’? Do you get the same problem with the firewalls turned off? Are the server and client on the same LAN (for the internal address case)? Is port forwarding enabled and working in the router (for the external address case)?

    My bet is that the external address case won’t work because you haven’t configured the port to be forwarded by your router or your router doesn’t support hairpin (local access to external IP). Other programs may work because they support UPnP or don’t rely on hairpin (all access to external IPs come from outside your LAN).

    I have no immediate explanation for why your desktop-to-laptop won’t work inside your LAN. Are you sure both computers are in the same LAN? Can they ping each other?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use this in my page class. I only just started
i am trying to use this code: <%= File.ReadAllText(Server.MapPath(Members/newsletters/welcome.html))%> which works great but now
I'm trying to use this layout with two 50% column width instead. But it
I'm trying to use this code to replace spaces with _, it works for
I'm trying to use: // this is a BreakHistory class from the ADO.NET Data
For a class project I'm trying to do some socket programming Python but running
Trying to use this method (gist of which is use self.method_name in the FunnyHelper
Trying to use this code to connect the AD PrincipalContext context = new PrincipalContext(ContextType.Domain,
trying to use this route: from(activemq:profiles).aggregate(header(cheese)).batchSize(30).bean(ProfilesQueueService, saveContacts) Fails with: No signature of method: org.apache.camel.model.RouteType.aggregate()
Im trying to use this page slider jquery plugin, you can see the demo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.