socket creation problem

  • Thread starter Thread starter L.Manoj
  • Start date Start date
L

L.Manoj

sir,
my operating system is windows 2000 professional with
service pack 4 installed. whenever i try to create a
socket from either Java,vc++,visual basic, an error is
returned saying socket creation failed and returning error
please help me how can i solve the problem. my system is
also an oracle server, this error is causing client
connections to fail because it is not able to start
listener
manoj
 
What is the error code (retrieved using WSAGetLastError(), for example)?

Removing TCP/IP from all adapters, and then re-adding it.

And make sure you run a virus scan.
 
From your message it appears you are trying to create a server type socket
which will be used for listening for request connections from clients.

You do not mention how you decide the port to use for the listening socket.

I suspect that the port you are specifying for your socket is already in use
by another application and this would be the first thing that I would check.

However, Mr. Phillips has the correct next step which is to retrieve the
error code and see what Windows thinks the problem is.

I would suggest as a standard practice to always put a call into the
appropriate GetLastError() function and then print it to the debugger output
screen after calling a Windows function even if you are not using the error
code in your production code to provide an informative error message. I try
to remember to do this so that when using the debugger during unit and
integration testing, I will be able to see the error code if a function call
fails.

Richard Chambers
 
Back
Top