/ Forside / Teknologi / Operativsystemer / Linux / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Linux
#NavnPoint
o.v.n. 11177
peque 7911
dk 4814
e.c 2359
Uranus 1334
emesen 1334
stone47 1307
linuxrules 1214
Octon 1100
10  BjarneD 875
Socket communication ....
Fra : Steen


Dato : 06-02-04 11:31

I am trying to use a geocode webservice from debian linux on port 7010 on a
remote windows host.

It is a geocode service which uses port 7010 for socket cummunication it is
installed on my own win 2k server.



I am able to connect to the service from another windows client (a JAVA
program) and the linux server is on the same LAN as the geocode webservice
server, so it is
not a firewall problem (IPtables removed!) on the linux.

I can connnect to the webservice via PHP (socket_create,
socket_set_nonblocked, socket_connect) and see in the webservicelog that a
connection has been established .



BUT i can NOT read (socket_read) %#%¤

From my PHP script i get the following message :
"Warning: socket_read() unable to read from socket [11]: Resource
temporarily
unavailable"


When i use "netstat -nap" i can see that there is an entry "host.com:7010"
and status is TIME_WAIT.



What is wrong ..?

Steen
steen@ebbeskov.dk



 
 
Jesper Louis Anderse~ (06-02-2004)
Kommentar
Fra : Jesper Louis Anderse~


Dato : 06-02-04 20:55

In article <bvvqa7$1urf$1@news.cybercity.dk>, Steen wrote:

> BUT i can NOT read (socket_read) %#%¤
>
> From my PHP script i get the following message :
> "Warning: socket_read() unable to read from socket [11]: Resource
> temporarily
> unavailable"

> When i use "netstat -nap" i can see that there is an entry "host.com:7010"
> and status is TIME_WAIT.

TIME_WAIT designates a closed connection waiting for duplicates in the
network to expire. This means that the server already has closed the
connection.

I would suggest going around PHP and use C or telnet to see what
happens. If errno is set at 11 we have an EAGAIN[1]. This indicates
that either your socket is non-blocking and no data was recieved or
the timeout value set on the socket expired.

Alternatively, look inside PHP to figure out what it does.

[1]
http://lxr.linux.no/source/include/asm-i386/errno.h#L14

--
j.

Søg
Reklame
Statistik
Spørgsmål : 177551
Tips : 31968
Nyheder : 719565
Indlæg : 6408836
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste