|
by: simon place |
last post by:
Spent some very frustrating hours recoding to find a way of closing a server
socket, i'd not thought it would be any problem,
however, after complete failure and as a last resort, i looked at the python
wrapper module for sockets, and found that the close command doesn't actually
call the underlying close! this didn't seem right, so i added it, and my code
now works simply and as expected.
def close(self):
|
by: Jane Austine |
last post by:
Running Python 2.3 on Win XP
It seems like socket is working interdependently with subprocesses of
the process which created socket.
------------------------------------
#the server side
>>> import socket
>>> s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
>>> s.bind(('localhost',9000))
|
by: Hameed Khan |
last post by:
hi all,
i am getting some problems with my first socket
script. can any one of you point me why this is
happening. the server script suppose to accept one
connection at a time and send countdown to client
connected to it from a function through a separate
thread. and echo all the connections opened and
closed. the client script is working fine. it echoes
the countdown it recieve from server.
|
by: w |
last post by:
I'm having problems with this program hanging on the revc(buf). I was
trying to figure out a way to allow the socket to timeout. I'm have
tried making the socket non-blocking but had on luck. Being very new
to Python, could there be a better way to accomplish this task. The
program works very well, but on occassion is will not receive the data
from the server and hang.
Thank,
|
by: zelzel.zsu |
last post by:
I wrote two simple socket program.
one for sending a file and the other for receiving the file.
but when I run it, a curious thing happened.
The received file was samller that the sent file.
$ cat receivefile.py
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import socket
|
|
by: Mark Fink |
last post by:
I try to port a server application to Jython. At the moment I use
Jython21\Lib\socket.py
Currently I do face problems with casting the string "localhost" to the
desired value:
D:\AUT_TEST\workspace\JyFIT>jython fit/JyFitServer2.py localhost 1234
23
localhost
Traceback (innermost last):
File "fit/JyFitServer2.py", line 146, in ?
|
by: Yang |
last post by:
Hi, I'm experiencing a problem when trying to close the file descriptor
for a socket, creating another socket, and then closing the file
descriptor for that second socket. I can't tell if my issue is about
Python or POSIX.
In the following, the first time through, everything works. On the
second connection, though, the same file descriptor as the first
connection may be re-used, but for some reason, trying to do
os.read/close on that...
|
by: ahlongxp |
last post by:
socket.makefile() may lose data when "connection reset by peer".
and socket.recv() will never lose the data.
change the "1" to "0" in the client code to see the difference.
confirmed on both windows and linux.
so I guess there is a problem with makefile().
# Echo server program
|
by: Hendrik van Rooyen |
last post by:
While doing a netstring implementation I noticed that if you
build a record up using socket's recv(1), then when you close
the remote end down, the recv(1) hangs, despite having a short
time out of 0.1 set.
If however, you try to receive more than one char, (I tested with 3,
did not try 2), then when you shut the remote end down you do not
get a time out, but an empty string - the normal end of file, I suppose.
Has anybody else seen...
|
by: jjbutler88 |
last post by:
I am trying to write a simple python IRC client, roughly following
this guide: http://www.devshed.com/c/a/Python/Python-and-IRC/
I have written some code, which uses the same commands as the guide,
but I get this error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
File "pythonirc.py", line 31, in run
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|