Client/Server

new topic     » topic index » view thread      » older message » newer message

--0-273284915-1162163094=:50452
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Help me please who have Client/Server programming experience. I'm trying use
socketlib.eu library for server program but can't resolve two problems:

1. I can't extract client's IP from communication parameters. I'm trying to do
it in SockAccept function after

    clientsock = fast_allocate(100)
    intp = fast_allocate(8)
    cd = c_func(accept, {sd, clientsock, intp})

I add my variant

    pointer_to_structure = peek4u(clientsock+2)
    client_ip = peek({pointer_to_structure+4, 8})

but it don't work.

What wrong and how do it correct ?

2. ServerLoop terminate work if any client close connection. Why and in what
manner I can fix this situation ?

Thanks

 
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited Try it today.
--0-273284915-1162163094=:50452
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Help me please who have Client/Server programming experience. I'm trying use
socketlib.eu library for server program but can't resolve two problems:<br><br>1.
I can't extract client's IP from communication parameters. I'm trying to do it in
SockAccept function after<br><br>&nbsp;&nbsp;&nbsp; clientsock =
fast_allocate(100)<br>&nbsp;&nbsp;&nbsp; intp =
fast_allocate(8)<br>&nbsp;&nbsp;&nbsp; cd = c_func(accept, {sd, clientsock,
intp})<br><br>I add my variant<br><br>&nbsp;&nbsp;&nbsp; pointer_to_structure =
peek4u(clientsock+2)<br>&nbsp;&nbsp;&nbsp; client_ip =
peek({pointer_to_structure+4, 8})<br><br>but it don't work.<br><br>What wrong and
how do it correct ?<br><br>2. ServerLoop terminate work if any client close
connection. Why and in what manner I can fix this situation
?<br><br>Thanks<br><p> 

<hr size=1>Access over 1 million songs - Yahoo! Music Unlimited <a
href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/">Try
it today.</a>

--0-273284915-1162163094=:50452--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu