Jump to content
  • Advertisement

Archived

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

Daywalker313

HawkNL, "The Buffer is too small"

This topic is 5735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Guest Anonymous Poster
Use SDL_net instead. SDL is RoXXors.

Share this post


Link to post
Share on other sites
I don''t know. You might need to debug the HawkNL code, or just wait until Phil replies on the HawkNL forums.

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
You need to check your socket error. Try this for some information:

http://www.ecst.csuchico.edu/~beej/guide/net/html/index.html

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!