473,563 Members | 2,904 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Socket, cannot get clean results.

Hello,
I am working on an interactive server/client setup, not using
INET::Sockets. Everything is gravy except for a little leftover stuff
being shown. I type a command w/ args, CLIENT join()s the command with
args and sends the newstring,the SERVER split()s the newstring and
runs command w/ args, SERVER prints to CLIENT a response saying it ran
command. however, if i type another command, theres like a one line
buffer between the client and the server.
for instance, if i type `/exit' and hit <enter>, SERVER will close and
exit, but CLIENT stays open, and the client script is waiting for
another command, if i hit enter again it will close the client
script.Is the problem when SERVER prints to CLIENT the confirmation?
am i not flushing correctly? ive pretty much always had this problem
when working with sockets. just a finger in the right direction would
be much appreciated. thanks.
Jul 19 '05 #1
1 2500
fr**@futura.net (Manfred) wrote in message news:<d6******* *************** ****@posting.go ogle.com>...
[...] stuff being shown. [...]
[ nothing shown ]
just a finger in the right direction would be much appreciated. thanks.


Please constuct a minimal but complete program to illustrate your
problem.
This and much other advice can be found in the posting guidelines that
are regularly posted to the newsgroup that replaced this one when when
the latter ceased to exist (see FAQ).
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12801
by: sashan | last post by:
I'm writing a program using sockets. I'm binding to a port like this: PORT = 5000 # Arbitrary non-privileged port s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) Now sometimes the rest of the program crashes later for whatever reason. As a result this leaves a socket bound to port 5000....
4
2421
by: flupke | last post by:
Hi, I have a gui (made in wxPython) that enables a user to connect to a server and issue some commands. The problem occurs when i try to disconnect the client. It exits but it doesn't return to the prompt. I have to push Ctrl-C in order to have it exit completely. The GUI is closed though. This is a piece of code from the main class that...
0
1548
by: Ajay | last post by:
hi! i have a main application which is run through a GUI. the GUI has a function 'start server' which starts a server in another thread and a stop function which should stop this server. the code is from Tkinter import * import tkMessageBox import tkFileDialog
2
2644
by: Dennis | last post by:
I want to listen for incoming socket connections on a thread. When I call MySocket.BeginAccept or MySocket.Accept, I cannot figure out how to stop the thread. Is there no way to stop the Socket Accept?
4
18097
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed as I find appropriate. I am using the socket asynchronously by calling the BeingSend and BeginReceive calls. I would like to be able to call...
6
6989
by: Pat B | last post by:
Hi, I'm writing my own implementation of the Gnutella P2P protocol using C#. I have implemented it using BeginReceive and EndReceive calls so as not to block when waiting for data from the supernode. Everything I have written works fine sending and receiving uncompressed data. But now I want to implement compression using the deflate...
3
3077
by: =?Utf-8?B?UGFpbiBhbmQgaGVhZGFjaGU=?= | last post by:
Hi, I am trying to get a webpage using a TcpSocket instead of a standard Webrequest. Initial, it works fine but after the 2 or 3 request the tcpclient I start to get the following error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because...
0
3559
by: george585 | last post by:
Hello! I am new to network programming, and understand just basics. Using some sample code, and having read documentation, I managed to create a simple app in C# and VB.NET. The application is supposed to do the following: monitor ALL INCOMING TCP traffic on the local computer, and save certain parts of it as files - not log files though, but...
2
18332
by: kodart | last post by:
Introduction Performance is the main concern to most server application developers. That’s why many of them anticipate using .NET platform to develop high performance server application regardless of the security features it provides. Microsoft Windows provides a high performance model that uses I/O completion port (IOCP) to process network...
4
7053
by: Zytan | last post by:
This may be the dumbest question of all time, but... When I set the packet size, does it mean ALL packets are that size, no matter what? Let's say the packet size is 8KB, and I send a 5 byte "hello", will it cause 8KB of bandwidth, or 5 bytes (plus TCP/IP packet header, as well, of course). (Btw, I 'set' the packet size via...
0
7664
marktang
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...
0
7583
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...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
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...
1
5484
isladogs
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...
1
2082
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
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.