server side socket program hangs
Fri Sep 26 17:19:24 CEST 2003
<anuradha.k.r at sify.com> wrote in message
news:57efaf35.0309260215.5ddd5734 at posting.google.com...
> i am writing a socket program in python,both client side and server
> side.I've written the client side which is working perfectly
> fine(checked it against server program written in C).but as for my
> server program written in python it simply hangs.it does not show any
> error also.I've tried sample programs available .I don understand what
> the reason is as i am quite new to it.
> here is teh server side program:
> from socket import *
> import socket
> import sys
> HOST = '' #any address
> PORT = htons(9999) #same port address as client
> can someone tell me what the problem is?
Your applying a function designed to simplyfy transfering IP addresses to a
literal value you want to use for your port. The following should show the
effect thats now happening.
PythonWin 2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)] on
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>> import socket
This email address is protected by SpamBayes
More information about the Python-list