Problem in Socket.....

C

Clement

Is it possible to close the socket connection immediately in
Python...... Because i am getting error even though i close it after
all the transfer.... I read from one article it is possible in C
socket.... Whether is it possible in Python?
 
D

Diez B. Roggisch

Clement said:
Is it possible to close the socket connection immediately in
Python...... Because i am getting error even though i close it after
all the transfer.... I read from one article it is possible in C
socket.... Whether is it possible in Python?

Which error? And usually the python api for sockets just wraps the
C-calls, so you should have the same options to properly close it.

Diez
 
G

Grant Edwards

Is it possible to close the socket connection immediately in
Python......

Sure. Just call the socket's close() method.

[You really ought to get that sticky '.' key fixed.]
Because i am getting error even though i close it after
all the transfer....

You're going to have to be a bit more specific if you want
useful suggestions.
I read from one article it is possible in C socket.... Whether
is it possible in Python?

Yes. The socket's close() method just calls libc's close() on
the socket.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top