473,387 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2499
fr**@futura.net (Manfred) wrote in message news:<d6**************************@posting.google. 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
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,...
4
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...
0
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...
2
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...
4
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...
6
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...
3
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...
0
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...
2
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...
4
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
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,...
0
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...

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.