Home > Archive > PERL Miscellaneous > October 2007 > sockets problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| stanciutheone@gmail.com 2007-10-21, 10:08 pm |
| 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
| |
| Brian McCauley 2007-10-25, 7:09 pm |
| On Oct 22, 2:10 am, "stanciuthe...@gmail.com"
<stanciuthe...@gmail.com> 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.
| |
| stanciutheone@gmail.com 2007-10-30, 7:09 pm |
| On Oct 25, 7:01 pm, Brian McCauley <nobul...@gmail.com> wrote:
> On Oct 22, 2:10 am, "stanciuthe...@gmail.com"
>
> <stanciuthe...@gmail.com> wrote:
>
>
>
> 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).
>
>
> 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
|
|
|
|
|