Hi

I am having problem with the following code below..

[b]m_socket = socket(AF_INET, SOCK_STREAM, 0);[/b]

.....

linger lgr;

lgr.l_onoff = 1;

lgr.l_linger = 5;

[b]setsockopt(m_socket, SOL_SOCKET, SO_LINGER, (const char*)&lgr,
sizeof(lgr)4) [/b]

....

struct tcp_keepalive keepalive;

keepalive.onoff = 1;

keepalive.keepalivetime = 60*1000 ;

keepalive.keepaliveinterval = 10*1000; DWORD returned;

[b]if(WSAIoctl(m_socket,SIO_KEEPALIVE_VALS,&keepalive,

sizeof(keepalive),NULL,0,&returned,NULL,NULL) == SOCKET_ERROR) [/b]

{

throw some error

}

It is in this last statement WSAIoctl that i get an error code
WSAEINVAL 10022.


Thanks in advance

Somesh