LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-25-2009, 02:52 AM   #1
kumbhalkar_sachin
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
Question Problem while recieving data on Socket


Hi Guys,
I am using socket for tcp/ip communication.

I have created socket and connected to server which is server.exe on another machine all the thing are ok.

client_socket = socket(AF_INET, SOCK_STREAM, 0);
connect (client_socket, (SA *) &server_address, sizeof(server_address));

Now I am trying to read hex data on socket, it receive proper data if receiving data not contains 0xff. But if comming data contains 0xff, whenever it encounter in receiving packet it return number of byte up 0xff. latter on the function breaks. I have tried received data using both the function below but it gives me same result.

data = read (client_socket, &recv_buff, 50); //read data packet of 50
data = recv(client_socket, &recv_buff, 50, 0); //read data packet of 50


Please help me
Thanks
 
  


Reply

Tags
socket


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't send data on serial port (recieving works) OdieQ Linux - Hardware 7 07-26-2008 05:38 AM
Mail Client (Problem Recieving) stevest Linux - Newbie 2 05-08-2006 03:40 PM
problem with new domain and recieving mail stitchman Slackware 2 12-13-2005 12:14 PM
cannot read data at server socket, though client socket sends it jacques83 Linux - Networking 0 11-15-2005 02:58 PM
problem in recieving information from a terminal device dinesh_2001 Linux - Networking 0 02-13-2004 10:36 AM


All times are GMT -5. The time now is 11:34 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration