Linux - Bonding - UDP Server receive two pieces of data at a time from client
Hi Folks,
Although the problem is not related to Linux directly when I write a Python script to setup an UDP server to listen data from client, I guess it should be about Linux networking. The following is some basic information. The server is a Linux-hosted box with RHAS 5.0. And it's configured to bond0 with mode = 0 (eth0 and eth1). The host can ping its peers in local network and ping google.com normally. However, when I prepare for a UDP server script in Python to try to listen all clients from outside and echo out for testing (see below), I always received at a time two pieces of data from client. ------------- #!/usr/bin/env python # UDP Echo Server - udpechoserver.py import socket host = '' port = 7878 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((host, port)) print "Server is starting(%s, %d)" % (host, port) while 1: try: message, address = s.recvfrom(8192) print "Got data from", address print message except KeyboardInterrupt: print "Server is showdown manually" break -------------- I ensure I send out ONE message from client per time, so I guess it should be a configuration typo somewhere. But where is it? Appreciated any reply. |
|
All times are GMT -5. The time now is 10:18 PM. |