473,395 Members | 1,678 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,395 software developers and data experts.

NetWork Stream problem.. i gave up :(



hi guys...

im writing a client/server application that uses tcpclient/tcplistener
to do the comunications...

i defined a tcpclient object called "client" and a networkStream called
"stream"..
stream = client.GetStream()

and the problem is:

every two send actions the listener only recognizes one !!!
i use "stream.write(...)

i fixed the problem by writing the "stream.write(..)" twice each
time... and it worked most of the time... but as u can see its not a
solution after all :)..

any help any opinion will be more than appreciated..

Thanks
Mulham.

Jan 31 '06 #1
2 1072
Hi,

<mu***********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...


hi guys...

im writing a client/server application that uses tcpclient/tcplistener
to do the comunications...

i defined a tcpclient object called "client" and a networkStream called
"stream"..
stream = client.GetStream()

and the problem is:

every two send actions the listener only recognizes one !!!
i use "stream.write(...)

i fixed the problem by writing the "stream.write(..)" twice each
time... and it worked most of the time... but as u can see its not a
solution after all :)..

any help any opinion will be more than appreciated..


Why don't you post some code, both the sender and receiver side.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jan 31 '06 #2
You really need to post some code (simple and complete sample showing the
issue). Your double write() is not a solution to this, there is something
else going on. Are you doing async reads on the server and dropping some?
It could be many things.

--
William Stacey [MVP]

<mu***********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
|
|
| hi guys...
|
| im writing a client/server application that uses tcpclient/tcplistener
| to do the comunications...
|
| i defined a tcpclient object called "client" and a networkStream called
| "stream"..
| stream = client.GetStream()
|
| and the problem is:
|
| every two send actions the listener only recognizes one !!!
| i use "stream.write(...)
|
| i fixed the problem by writing the "stream.write(..)" twice each
| time... and it worked most of the time... but as u can see its not a
| solution after all :)..
|
| any help any opinion will be more than appreciated..
|
| Thanks
| Mulham.
|
Jan 31 '06 #3

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

Similar topics

6
by: Yechezkal Gutfreund | last post by:
I have been using the following code (successfully) to read Xml formated text packets from a TCP stream. The output from the server stream consists of a sequence of well formed Xml documents...
8
by: Scott | last post by:
Hi guys, If I try to call read(), readline(), readtoend() and there is nothing to read (from a never ending loop for example) the program seems to continue but it exits the loop for no apparent...
5
by: Baren | last post by:
Hi! I am using impersonate="true" to upload and download files from a network share. I have created common users on both the webserver and the file server. The user has permission to the...
3
by: Sir Psycho | last post by:
Hi, For some reason, when i step over this code, it returns the full byte stream im expecting from the server, however when I let it run with no intervention, it only seems to grab a small chunk...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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...
0
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...

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.