PadrinatoR Posted September 23, 2006 Share Posted September 23, 2006 (edited) Hi!! I'm writing a Pictionary game for DS and now I'm trying to send images to the server in order to resend them to the other consoles. The drawing area size is: 221x153 so I'm trying to send 33813 bytes, 33,02KB. I send it in only one packet but I receive two packets in my server app: one of 4260bytes and other of 3991bytes. I'm using normal TCP connection and DSWifi 0.3b. What can be the problem? Thanks in advance. See ya! Edited September 23, 2006 by PadrinatoR Link to comment Share on other sites More sharing options...
sgstair Posted September 23, 2006 Share Posted September 23, 2006 Hiya, well, there are some things you really should know about TCP; Firstly, you should not treat it as a packeted format, it's a stream format, so the only requirement is that bytes come out of the "pipe" on the destination side in the same order that they were put in on the source.Additionally though, you're not checking the return value of the "send" function, as it returns the number of bytes that have been sent, you must call the function again with the remaining data if the returned value does not match the size of the data you are trying to send. -Stephen Link to comment Share on other sites More sharing options...
PadrinatoR Posted September 24, 2006 Author Share Posted September 24, 2006 Thank you very much I don't know much about sockets, sorry :S See ya! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now