xboxscene.org forums

Author Topic: Need More Help :)  (Read 51 times)

SHiZNO

  • Archived User
  • Sr. Member
  • *
  • Posts: 287
Need More Help :)
« on: February 20, 2004, 04:08:00 PM »

the code works, might be something to do with your network not being set up right
Logged

dXtr333

  • Archived User
  • Newbie
  • *
  • Posts: 9
Need More Help :)
« Reply #1 on: February 21, 2004, 06:34:00 AM »

dry.gif

-----------------
well.. I figured the socket can't be wrong, xuz then I would get a INVALID_SOCKET return. So I started rereading all the docs for like the 100 time.. and then at the bottom it was a liitle notes on the lib files.. so I checked my lib files
and discoverd I was linking with xonlines.lib so I tested changing to xonline.lib and now it works! But now I get another problem.. I don't recive anything my log looks like:

recv:
recv:
recv:
recv:
recv:
recv:
and goes on like that and fills the log with 17MB of data! It would have been more if haven't shutdown the power.

so somethings real wrong in here:
int rr = 1;
char aa[5000];
while(rr)
{
rr = recv(sock, aa, 500, 0);
debug("recv: ", aa);
}

-----

Ops.. find my first error in the code:
debug("recv: ", aa); should be debug("recv: %s", aa);
and then I tried removing the while loop
but then I just get some strange symbols back..
and the recv() functions take like a minute to execute also.. while the send() takes like a second

----
just found out it most be some socket error.. sad.gif
trying to fix it now..

----
lol biggrin.gif
just found the error.. I just typed wrong in the send() function wink.gif
oh well.. now it worls smile.gif
Logged