Thread: Socket programming

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    1

    Post Socket programming

    Hi friends,

    I am trying to send NULL character inside a string over tcp socket.
    It is sending all other characters except NULL character.

    When typecast from int to char, all integers are typecasted to char except int 0.
    In my code I want the variable m1 (see line 73) to contain null character with strlen as 1.

    I have attached the C program at the end. juct click on .c to view it.




    Thanks and regards,
    Ajit
    Attached Files Attached Files
    • File Type: c .c (4.8 KB, 180 views)
    Last edited by ajitteli; 04-18-2011 at 06:52 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Read this, so you can post something people will actually want to read.
    SourceForge.net: Indentation - cpwiki
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket Programming
    By anirban in forum Networking/Device Communication
    Replies: 10
    Last Post: 04-07-2010, 07:22 PM
  2. About Device Driver Programming And Socket Programming
    By pritesh in forum Linux Programming
    Replies: 6
    Last Post: 01-23-2010, 03:46 AM
  3. Socket programming in C with socket.h
    By funzy in forum Networking/Device Communication
    Replies: 13
    Last Post: 08-29-2008, 04:12 AM
  4. Socket Programming
    By pobri19 in forum C Programming
    Replies: 6
    Last Post: 06-01-2008, 07:01 AM
  5. which programming language should be used for socket programming?
    By albert_wong_bmw in forum Networking/Device Communication
    Replies: 8
    Last Post: 06-04-2004, 08:12 PM