Archived

This topic is now archived and is closed to further replies.

Daywalker313

HawkNL, "The Buffer is too small"

Recommended Posts

I posted this at the HawkNL messageboard too but it doesn''t seem to be active anymore. I''ve got a problem with HawkNL (1.6.2): I have a server and a client app (TCP), the server sends 3 messages each 250ms. The client runs a while() loop about 100 times/second and receives the data: int readlen = nlRead(clientsocket, readbuffer, receive_packet_size-received_bytes); After about 15-80 (seems to be random) seconds, the client returns "-1" as readlen and displays the error message "HawkNL error: The Buffer is too small". I ran it with localhost and with another computer and had the same problems.

Share this post


Link to post
Share on other sites
You can find info on this by reading about the recv function call. It isn''t specific to just HawkNL, as Hawk just wraps sockets (Winsock on Windows).

Basically it means that you''re trying to read a packet into your buffer, but the packet is bigger than your buffer. One solution is to increase your buffer size.

Share this post


Link to post
Share on other sites
I made some further tests and it seems that server and client get disconnected because the server now gives me a socket error too. So could it be that the "buffer too small" message is wrong and what can be reasons to disconnect (I''ve tried localhost and over network on 3 machines and always the same)?

Share this post


Link to post
Share on other sites