sockets problem

Discussion in 'Perl Misc' started by stanciutheone@gmail.com, Oct 22, 2007.

  1. Guest

    Hi,
    my name is valentin and i'm trying to create a server using sockets,
    the problem is that after i receive the data from the client i can't
    send a message back if i will not send to the other clients the
    message that the socket received, this problem i heaved also found in
    a php application that i'm trying to develope,

    if you need to see the source you can find it below:

    http://pastebin.com/m30faafe4

    Thank you, for helping me out
     
    , Oct 22, 2007
    #1
    1. Advertising

  2. On Oct 22, 2:10 am, ""
    <> wrote:
    > Hi,
    > my name is valentin and i'm trying to create a server using sockets,
    > the problem is that after i receive the data from the client i can't
    > send a message back if i will not send to the other clients the
    > message that the socket received, this problem i heaved also found in
    > a php application that i'm trying to develope,
    >
    > if you need to see the source you can find it below:
    >
    > http://pastebin.com/m30faafe4


    I've downloaded that and after uncommenting the call to broadcast it
    seems to do what it appears to be intended to do. (Which is to print
    "USERLIST>matap" to all terminals whenever anyone enters a line
    starting with a recognised command verb).

    > Thank you, for helping me out


    You will have to give a better explanation of what your code is doing
    and how this differs from your expectations.

    You could also make it strict. This makes it much less difficult for
    people who what to try to help you (including, of course, yourself).

    Please see the posting guidelines.
     
    Brian McCauley, Oct 25, 2007
    #2
    1. Advertising

  3. Guest

    On Oct 25, 7:01 pm, Brian McCauley <> wrote:
    > On Oct 22, 2:10 am, ""
    >
    > <> wrote:
    > > Hi,
    > > my name is valentin and i'm trying to create a server using sockets,
    > > the problem is that after i receive the data from the client i can't
    > > send a message back if i will not send to the other clients the
    > > message that the socket received, this problem i heaved also found in
    > > a php application that i'm trying to develope,

    >
    > > if you need to see the source you can find it below:

    >
    > >http://pastebin.com/m30faafe4

    >
    > I've downloaded that and after uncommenting the call to broadcast it
    > seems to do what it appears to be intended to do. (Which is to print
    > "USERLIST>matap" to all terminals whenever anyone enters a line
    > starting with a recognised command verb).
    >
    > > Thank you, for helping me out

    >
    > You will have to give a better explanation of what your code is doing
    > and how this differs from your expectations.
    >
    > You could also make it strict. This makes it much less difficult for
    > people who what to try to help you (including, of course, yourself).
    >
    > Please see the posting guidelines.


    sorry but i heaved found the problem was so:
    -> when you receive the string from the socket you will need to delete
    the last caracter because is \0

    -> and you will need to send a string you will need to add a \0

    Best Regards
     
    , Oct 30, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VincentWong
    Replies:
    1
    Views:
    589
    VincentWong
    Dec 29, 2003
  2. Torsten Brasch
    Replies:
    5
    Views:
    6,288
    Feroze [MSFT]
    Jan 7, 2004
  3. Leo

    java sockets problem

    Leo, Sep 29, 2003, in forum: Java
    Replies:
    2
    Views:
    417
    Steve Horsley
    Sep 30, 2003
  4. Louis Cyphre
    Replies:
    7
    Views:
    1,110
    Esmond Pitt
    Apr 13, 2005
  5. Manuel Hegemann

    Problem: sockets

    Manuel Hegemann, Apr 27, 2004, in forum: C++
    Replies:
    3
    Views:
    443
    Default User
    Apr 27, 2004
Loading...

Share This Page