Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl socket on linux won't accept connections from windows clients

Reply
Thread Tools

Perl socket on linux won't accept connections from windows clients

 
 
Eli Sidwell
Guest
Posts: n/a
 
      06-11-2004
I am trying to write a tcp server for linux using perl.

When I run the file it works, but it only accepts connects form linux,
won't accept connects from windows apps.

Any help is appreciated.

Sid.
 
Reply With Quote
 
 
 
 
penguinista
Guest
Posts: n/a
 
      06-11-2004
Eli Sidwell wrote:
> I am trying to write a tcp server for linux using perl.
>
> When I run the file it works, but it only accepts connects form linux,
> won't accept connects from windows apps.
>
> Any help is appreciated.
>
> Sid.

is accept() not accepting a connect or is the server having trouble
after that? What kind of client are you using?

- microsoft has had cases of not playing exactly according to
established protocols.

- windows uses a <cr><lf> end of line indicator whereas *nix uses just
<lf>. The difference can cause difficulty if unnaccounted for.
 
Reply With Quote
 
 
 
 
Jeff Dunn
Guest
Posts: n/a
 
      06-12-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (Eli Sidwell) wrote in message news:<(E-Mail Removed). com>...
> I am trying to write a tcp server for linux using perl.
>
> When I run the file it works, but it only accepts connects form linux,
> won't accept connects from windows apps.
>
> Any help is appreciated.
>
> Sid.


Well there shouldnt be any difference, you might try posting your code
 
Reply With Quote
 
Eli Sidwell
Guest
Posts: n/a
 
      06-12-2004
penguinista <(E-Mail Removed)> wrote in message news:<40ca3650$0$21965$(E-Mail Removed)>...
> Eli Sidwell wrote:
> > I am trying to write a tcp server for linux using perl.
> >
> > When I run the file it works, but it only accepts connects form linux,
> > won't accept connects from windows apps.
> >
> > Any help is appreciated.
> >
> > Sid.

> is accept() not accepting a connect or is the server having trouble
> after that? What kind of client are you using?
>
> - microsoft has had cases of not playing exactly according to
> established protocols.
>
> - windows uses a <cr><lf> end of line indicator whereas *nix uses just
> <lf>. The difference can cause difficulty if unnaccounted for.


It appears that the client never gets an accept. Perl code does not
seem to hang or error. Clients: MS Telnet and Winsock via. VB.
I can telnet to the server from Linux(same box) and it works as
expected.
 
Reply With Quote
 
Joe Smith
Guest
Posts: n/a
 
      06-14-2004
Eli Sidwell wrote:

> I am trying to write a tcp server for linux using perl.
>
> When I run the file it works, but it only accepts connects form linux,
> won't accept connects from windows apps.


I've written TCP servers that work just fine accepting incoming connections
from Linux, Solaris and Windows. There is nothing in the TCP protocol
that discriminates against one OS versus another.
-Joe
 
Reply With Quote
 
Eli Sidwell
Guest
Posts: n/a
 
      06-15-2004
Joe Smith <(E-Mail Removed)> wrote in message news:<b0czc.20257$Hg2.3338@attbi_s04>...
> Eli Sidwell wrote:
>
> > I am trying to write a tcp server for linux using perl.
> >
> > When I run the file it works, but it only accepts connects form linux,
> > won't accept connects from windows apps.

>
> I've written TCP servers that work just fine accepting incoming connections
> from Linux, Solaris and Windows. There is nothing in the TCP protocol
> that discriminates against one OS versus another.
> -Joe


I have solved the problem with not accepting connections from MS
Telnet, but I am still having a problem with sending data via. a VB
application. The client connects and the server acknowledges it, but
the Perl Script never gets any data. like it did from MS Telnet.

Thanks

Sid ..
 
Reply With Quote
 
Eli Sidwell
Guest
Posts: n/a
 
      06-18-2004
(E-Mail Removed) (Eli Sidwell) wrote in message news:<(E-Mail Removed). com>...
> Joe Smith <(E-Mail Removed)> wrote in message news:<b0czc.20257$Hg2.3338@attbi_s04>...
> > Eli Sidwell wrote:
> >
> > > I am trying to write a tcp server for linux using perl.
> > >
> > > When I run the file it works, but it only accepts connects form linux,
> > > won't accept connects from windows apps.

> >
> > I've written TCP servers that work just fine accepting incoming connections
> > from Linux, Solaris and Windows. There is nothing in the TCP protocol
> > that discriminates against one OS versus another.
> > -Joe

>
> I have solved the problem with not accepting connections from MS
> Telnet, but I am still having a problem with sending data via. a VB
> application. The client connects and the server acknowledges it, but
> the Perl Script never gets any data. like it did from MS Telnet.
>
> Thanks
>
> Sid ..


I have solved the issue with the MS VB Winsock.
Issue: Winsock won't flush
Solution: Append the text with Chr(0) or
Chr(13) & Chr(10) & "." & Chr(13) & Chr(10) (who knows why this works) or
Precede the text with the length of the text (again, who knows) or
make the text bigger than 2k.

New Issue: If the Winsock misbehaves and closes the connection incorrectly
Perl prints out "Broken Pipe" and exits the script.
Is there anyway to trap this error and just set the port to listen again ?

Thanks

Sid.
 
Reply With Quote
 
Gavin Williams
Guest
Posts: n/a
 
      06-24-2004
The last comment reminds me of an issue I encountered that was
similar....you mentioned you can connect from the "same box".

The issue them might not be Win32 vs. Linux...but the value of the "local"
address used to create the server.

My experience was with using IO::Socket::INET to create a server, and I used
the loopback address (127.0.0.1) for the "LocalAddr" option when I created
my server object.

I could connect all day from the same system but never from any other
systems on the network. When I changed the value of "LocalAddr" to the host
system's LAN address, everything could connect as expected.

Depending on what you used to construct the server, if the server's local
address is "127.0.0.1" then it may only accept connections from clients
requesting address 127.0.0.1.

"Eli Sidwell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> penguinista <(E-Mail Removed)> wrote in message

news:<40ca3650$0$21965$(E-Mail Removed)>...
> > Eli Sidwell wrote:
> > > I am trying to write a tcp server for linux using perl.
> > >
> > > When I run the file it works, but it only accepts connects form linux,
> > > won't accept connects from windows apps.
> > >
> > > Any help is appreciated.
> > >
> > > Sid.

> > is accept() not accepting a connect or is the server having trouble
> > after that? What kind of client are you using?
> >
> > - microsoft has had cases of not playing exactly according to
> > established protocols.
> >
> > - windows uses a <cr><lf> end of line indicator whereas *nix uses just
> > <lf>. The difference can cause difficulty if unnaccounted for.

>
> It appears that the client never gets an accept. Perl code does not
> seem to hang or error. Clients: MS Telnet and Winsock via. VB.
> I can telnet to the server from Linux(same box) and it works as
> expected.



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 1 01-27-2009 05:05 PM
How many connections can accept a 'binded' socket? billiejoex Python 4 03-21-2007 09:18 AM
Authentication for web clients and Swing clients Francesco Java 1 12-27-2006 03:10 AM
Perl socket on linux won't accept connections from windows clients Eli Sidwell Perl Misc 1 06-10-2004 10:43 PM
Socket.accept problem via Socket.for_fd($stdin.fileno) Lee Skillen Ruby 1 09-11-2003 01:41 PM



Advertisments