Click here to Skip to main content
15,913,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: calling the function specified by a string Pin
Vitali Halershtein7-Aug-03 23:36
Vitali Halershtein7-Aug-03 23:36 
GeneralRe: calling the function specified by a string Pin
jhwurmbach8-Aug-03 3:03
jhwurmbach8-Aug-03 3:03 
GeneralRe: calling the function specified by a string Pin
Jerome Conus8-Aug-03 3:23
Jerome Conus8-Aug-03 3:23 
GeneralRe: calling the function specified by a string Pin
jhwurmbach8-Aug-03 4:30
jhwurmbach8-Aug-03 4:30 
GeneralRe: calling the function specified by a string Pin
Jerome Conus8-Aug-03 4:39
Jerome Conus8-Aug-03 4:39 
GeneralRe: calling the function specified by a string Pin
Anthony_Yio11-Aug-03 2:06
Anthony_Yio11-Aug-03 2:06 
GeneralStock Color Property Page Pin
marcvoor1237-Aug-03 22:37
marcvoor1237-Aug-03 22:37 
GeneralProblems with sockets (win32) Pin
justin2237-Aug-03 21:55
justin2237-Aug-03 21:55 
Hello

I've got a client/server application that sends small packets 10-50 bytes.
The server, running win2000, uses IOCP and WSARecv + WSASend.
The client uses an ownmade socket class also using WSARecv/WSASend and overlapped IO.

Both the client/server waits for a Read, handles it and invoked WSARecv again. WSASend is only invoked when something is waiting in the outbuffer.

Serverside:

The first two transactions are handled ok (both transactions are sent at the same time and is recieved with the same WSARecv). But the second transaction, sent a couple of seconds later, will not be read by the server.
The IOCP function gets called by the WSARecv but 0 bytes read are reported.

ClientSide:
After the last send I do a WSAGetOverlappedResult and it reports that the bytes were sent.


I've tried to disable the nagle algorithm and setting SO_SNDBUF + SO_RCVBUF to 0 in the client. I've also tried to set SO_SNDBUF/SO_RCVBUF to zero in the server.

client log:
Socket(3)(Connect): WSAConnect() OK!
Socket(3)(Read): WSARecv
Socket(3)(Read): pending read...
Send Trans: 0
Send Trans: 2
Socket(3)(Send): New data triggered.
Socket(1)(Send): WSASend
Socket(3)(Send): Write completed
Socket(3)(Read): Read completed.
Socket(2)(Read): WSAGetOverlappedResult
Recieve, Trans: 0
Socket(2)(Read): 71/71 bytes handled
Socket(3)(Read): WSARecv
Socket(1)(Read): Completed directly 14 bytes
Recieve, Trans: 2
Socket(2)(Read): 14/14 bytes handled
Socket(3)(Read): WSARecv
Socket(3)(Read): pending read...
Send Trans: 3
Socket(3)(Send): New data triggered.
Socket(1)(Send): WSASend
Socket(3)(Send): Write completed
Socket(3)(Read): Read completed.
Socket(2)(Read): WSAGetOverlappedResult <- returns 0 bytes


serverlog:
prio: 1 client: 4 Connect from 127.0.0.1:1201
prio: 1 client: 4 Read -> Incomming bytes: 29
prio: 3 client: 4 Recieve, Trans: 0
prio: 3 client: 4 Send, Trans: 0
prio: 1 client: 4 Send -> WSASend
prio: 2 client: 4 Send ->Sent 71/71 bytes. (flags: 0)
prio: 3 client: 4 Recieve, Trans: 2
prio: 3 client: 4 Send, Trans: 2
prio: 1 client: 4 Send -> WSASend
prio: 2 client: 4 Send ->Sent 14/14 bytes. (flags: 0)
prio: 2 client: 4 Read -> 29/29 bytes handled
prio: 1 client: 4 Read -> WSARecv
prio: 2 client: 4 Read -> Pending read inited
prio: 0 client: 4 0 bytes read!
prio: 1 client: 4 Read -> aborting, dead or shutting down...

What am I doing wrong?
GeneralRe: Problems with sockets (win32) Pin
John M. Drescher7-Aug-03 23:25
John M. Drescher7-Aug-03 23:25 
GeneralRe: Problems with sockets (win32) Pin
justin2237-Aug-03 23:27
justin2237-Aug-03 23:27 
GeneralCursor in DirectX Pin
Skirmish7-Aug-03 21:23
Skirmish7-Aug-03 21:23 
GeneralResizing limit Pin
SLiDeR7-Aug-03 20:08
SLiDeR7-Aug-03 20:08 
GeneralRe: Resizing limit Pin
Larry Antram7-Aug-03 20:17
Larry Antram7-Aug-03 20:17 
QuestionHow to fire an event from the program? Pin
ben27-Aug-03 20:02
ben27-Aug-03 20:02 
AnswerRe: How to fire an event from the program? Pin
Anthony_Yio7-Aug-03 23:37
Anthony_Yio7-Aug-03 23:37 
GeneralInternet Explorer custom menu Pin
Mohsen Saad7-Aug-03 19:18
Mohsen Saad7-Aug-03 19:18 
QuestionIn OLE,how to know that the server has finished one operation? Pin
vcseeker7-Aug-03 18:20
vcseeker7-Aug-03 18:20 
GeneralHelp! Pin
DaveE9th7-Aug-03 16:43
DaveE9th7-Aug-03 16:43 
GeneralRe: Help! Pin
Dave Bryant7-Aug-03 17:32
Dave Bryant7-Aug-03 17:32 
GeneralRe: Help! Pin
DaveE9th7-Aug-03 17:35
DaveE9th7-Aug-03 17:35 
GeneralRe: Help! Pin
Dave Bryant7-Aug-03 17:43
Dave Bryant7-Aug-03 17:43 
GeneralRe: Help! Pin
DaveE9th7-Aug-03 19:35
DaveE9th7-Aug-03 19:35 
QuestionHow can I create a window? Pin
ribbs7-Aug-03 15:23
ribbs7-Aug-03 15:23 
GeneralScrolling a tree view Pin
Marissa1827-Aug-03 14:26
Marissa1827-Aug-03 14:26 
GeneralRe: Scrolling a tree view Pin
Maximilien7-Aug-03 14:54
Maximilien7-Aug-03 14:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.