Re: Delphi and Socket Error 10022



Steve wrote:

Lo All

Within a service application, I create a socket component (based upon OverByteICWSWSocket), assign an IP Address and port and connect to a server.

All's fine.

However occasionally I get "Error 10022 WSAAsyncSelect", which apparently is to do with invalid arguments. However, the arguments have not changed - the socket is created in response to a timer being fired. The parameters supplied to the socket are the same each time. I cannot see what could be changing to cause this error.

The socket is created within a thread, but it all takes place within critcal sections. There is only ever one thread.

Any help would be gratefully appreciated.

Thanks

BTW Delphi 7 Prof, WinXP (Sp2)


WSAEINVAL

(10022)

Invalid argument.

Some invalid argument was supplied (for example, specifying an invalid level to the setsockopt function). In some instances, it also refers to the current state of the socket - for instance, calling accept on a socket that is not listen
ing.

what this means is, your parameters must likely are fine how ever, you
could be experiencing a dropped socket or one that is busy doing something..
could be a problem with lack of response from a socket and your thread
then try's to do something else before the socket has completed on the last run.



--
"I am never wrong, once i thought i was, but i was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

.



Relevant Pages

  • Re: socket questions
    ... tcplistener, which is the server side, right? ... multiple connections use the same socket so it isn't as easy as listening to ... one channel for a response. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: socket questions
    ... Each connection use theirs own particular socket instance, ... This depends of the protocol the server is using, ... > one channel for a response. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Socket Question
    ... A socket question from a networking newbie. ... check that message and response to it. ... the client get the server message and send another message. ...
    (comp.lang.python)
  • Re: socket questions
    ... TcpClient socket; ... > one does not (send while waiting for a response from a previous ... > an event with the server response as the event argument. ... each thread generating a connection? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Socket Question
    ... close it when you receive the your response. ... A socket question from a networking newbie. ... the client get the server message and send another message. ...
    (comp.lang.python)