Re: Impelementing messaging protocols (IOCP socket server)

Tech-Archive recommends: Fix windows errors by optimizing your registry



I am sorry, here is the wrong group for this topic. So I open the same topic
under microsoft.public.win32.programmer.networks group.


"Kürþat" <xx@xxxxxx> wrote in message
news:uvgfTw6LIHA.4136@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I try to implement a messaging protocol in my IOCP based socket server. I
decide to use message header approach in my implementation. The header
will simply contain length of the actual message. If, for example, length
of the header is 5, first I will post a WSARecv () with a 5-byte
buffer.When this function completes, one of my IOCP workers will get the
header(i.e. length of the message body) and post another WSARecv () to get
actual message. The problem is that if a client application sends a
message with wrong header then the server gets wrong message length and
communication between the server and that client is broken (most likely
remain broken along that session). Do you have recommendations about this
issue and about building messaging protocols in general?

Thanks in advance.



.



Relevant Pages

  • Re: Cant send back null class reference as SOAP Header?
    ... State is maintained on the server (no ... the client actually maintains the key to the state ... If they then retry the request, the flag won't be sent, will it? ... The header is defined as Direction.InOut on every ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: GroupWise 7.0.1-Client: Disposition-Notification-To?
    ... Teilen auch Server, vor allem beim Senden, denn da legt der *Client* ... selber ganz alleine die Header fest, und versendet selber per SMTP. ...
    (de.comp.sys.novell)
  • Re: File Data and Time
    ... WebClient class does give some size in the Progress event i found it ... An HTTP server isn't required to provide that information, ... The closest thing is the value of the Last-Modified header, ... you need a better client interface. ...
    (microsoft.public.dotnet.framework)
  • Re: Kerberos with Windows Integrated authentication
    ... Roughly speaking, the HTTP server uses the WWW-Authenticate header to send messages to the authenticating client, while the client uses the Authorization header to send authentication messages to the server. ...
    (microsoft.public.windows.server.security)
  • HTTP keep-alive performance
    ... So, I captured the TCP traffic with wireshark (both, server and client are running on the same machine, 'http://localhost ', so its not the network). ... The TCP ACK package is sent ... HEADER --> ...
    (comp.lang.python)