| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Comments:
<0> does poll have timeouts like select()? <0> nvm <1> mornin good folks. <0> ush <0> i cant get poll to work it wont timeout ;/ <2> SgtUnix: good morning! <1> morning kawfee <1> do you have some black stuff for me? <2> Do you need some morning coffee? <1> YES <1> exactly what I was thinking <1> :( <2> That's not what you wanted? <2> How about that? =]
<3> kthx^, it should timeout. how big did you make the timeout value <0> 500,5000,5*1000 <0> so i dont think its the timeout im doing wrong <0> ;/ <2> SgtUnix: how you been? <3> works when I use it <1> kawfee: hungry <0> small example? <2> SgtUnix: eat a carrott <1> kawfee: If I only had a carrot. <1> Naw, McDonalds it is. <2> You have McDonalds there? Wow <1> kawfee: Yeah. <1> since um... 1988? <1> anyways, gone <3> kthx^, paste your source code <3> calc paste <4> Please paste your code (or a complete example that demonstrates your problem) here: http://rafb.net/paste/ <3> put it there <0> does argument one of poll() have to be a pointer? <0> the struct of pollfd <3> thats right <0> is it allright to declare it as a pointer? <3> it's a pointer to an array of them <3> #include <sys/poll.h> <3> you don't do it yourself. you include the apropriate .h file! <0> will struct pollfd *poll; work? <3> do it properly and stop being a ****! <3> please <0> eh? <0> atm i got #include <poll.h> <3> struct pollfd poll; <0> yah <3> err = poll (&pollfd,1,500); <3> if you want more than 1 <3> struct pollfd poll[5]; <0> what if its 1? <3> that'll get you 5 <0> oh yeh nvm <3> what is nvm? <3> I hope it's vulgar <3> kthx^, you really should look at the man files for these things <3> then you might have less questions to ask <0> nvm = nevermind <3> got it working yet? <0> haha yup <0> wewt! <3> good <3> what did you have wrong before? <0> i dunno i just redid everything to do with poll <0> which wasnt much <3> nice of them to make it simple <3> for a change <0> yeah <0> win32 needs poll <3> win32 needs retiring <0> lol <0> i just got into nix, think its leet with fork() <3> posix threads are often used too <0> meh <3> but fork is so easy
<0> yeah <0> how do you disconnect a socket on linux? <5> shutdown(s, 2); close(s); <0> ;o <0> what does 2 mean? <0> is it SHUT_RDWR ? <3> kthx^, it's all in the man file <0> man file? <3> shutdown can shutdown sending , recieving or both <3> shutdown <0> im used to closesocket <0> easier <3> close is the one you usually use to clase a socket <3> clase == close <3> :) <0> yeah im using that but <3> ? <0> it just is stoppping data traffic <6> mornin' <0> not telling the client that it got disconnecte <6> hey OrngeTide, you awake? <3> if you read from a socket that was closed at the other end it will return 0 bytes read <3> then you close your end <0> err like <0> im not getting a disconnected from server <0> on the client <6> no fin, kthx? <0> ? <6> throw a packet logger at it, see exactly what happens. <0> ugh <6> what are we talking about, anyways? <3> what is the server. are you sending it the right data? <7> hi gambit <6> hey OrngeTide, got a moment? <7> sure <0> its an irc server, so on win32 closesocket() id get dissconnected from server but with nix close() i get nuthin it only stops socket data etc. <3> close does close the socket <0> hmmm <3> how are you using it? <3> close(fd); <3> or something else? <3> rather err = close(fd); <3> err = 0 ; closed ok <0> close(socket); <0> return -1; <3> is the socket created and connected? <0> yup <0> and i can sedn data <0> then close() will not let the server or client rcv data <3> paste your source code <3> calc paste <4> Please paste your code (or a complete example that demonstrates your problem) here: http://rafb.net/paste/ <0> its very big <3> why don't you write a small example then <8> man shutdown <3> close should work <3> works for me <0> ugh <0> what does close return if it worked? <8> Are you dealing with non-blocking sockets? <9> what does your book/reference say? <8> If yes, you probably want shutdown <0> im just using simple sockets so i couldnt answer your question Maloeran <8> man 2 shutdown rather <0> i did try that tho combined with close... <3> what's the name of the global error variable. it's been so long since I used it I don't remember <0> i got return of 0 on close() <0> :/ <3> it's working then <0> still not sending a disconnection... <3> never mind <3> :) <3> found it again <3> kthx^, you might be better off including errno.h , then the int errno will have an error number
Return to
#c or Go to some related
logs:
cisco is crap #hardware #computers #politics AMAME AMD did zidane get a medal #heroin #computers #stocks #computers
|
|