Windows client does not connect to Unix socket 
Author Message
 Windows client does not connect to Unix socket

I am learning socket programming on Linux (gcc).

I have used Vic Metcalfes code from the unix-socket-faq to build a server
that accepts connections using the select() command.

The code works great when telneting from Unix terminals, but when I telnet
from a Windows client the connection is dropped immediately.

Am I missing something obvious here? Is there an incompatibility with
Windows wheh trying to connect to a Unix socket on the server?

TIA
Bruce



Sun, 20 Apr 2003 19:28:13 GMT  
 Windows client does not connect to Unix socket

Quote:

> I am learning socket programming

Which is off-topic here, please see comp.unix.programmer.

Quote:
> on Linux (gcc).

If you need to say this, that's your first hint that it's OT.

Quote:
> The code works great when telneting from Unix terminals, but when I telnet
> from a Windows client the connection is dropped immediately.

Telnet is a protocol, not a name for "raw socket connection."  Have
you attempted to support the former or the latter?  Telnet is anything
but simple.  (This is not an invitation for discussion, but something
for you to think about, perhaps before you repost your question to
comp.unix.programmer.)

--



Sun, 20 Apr 2003 19:52:57 GMT  
 Windows client does not connect to Unix socket

Quote:
> I am learning socket programming on Linux (gcc).

Sockets are not a standard C feature.

Quote:
> I have used Vic Metcalfes code from the unix-socket-faq to build a server
> that accepts connections using the select() command.

select() is not a standard C function.

Quote:
> The code works great when telneting from Unix terminals, but when I telnet
> from a Windows client the connection is dropped immediately.

The C standard does not specify Unix or Windows.

Quote:
> Am I missing something obvious here? Is there an incompatibility with
> Windows wheh trying to connect to a Unix socket on the server?

No idea... but maybe comp.unix.programmer or
comp.os.ms-windows.programmer would have some idea.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #80 D+ ADA N+++ |
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/

"Hasta la Vista, Abie!"
   - Bart Simpson



Sun, 20 Apr 2003 20:00:40 GMT  
 Windows client does not connect to Unix socket

Quote:
>Which is off-topic here, please see comp.unix.programmer.<

They sent me here as I am writing the code in C!

Bruce



Sun, 20 Apr 2003 20:15:13 GMT  
 Windows client does not connect to Unix socket

Quote:
>>Which is off-topic here, please see comp.unix.programmer.<
> They sent me here as I am writing the code in C!

Then they sent you to the wrong place. comp.unix.programmer is for Unix
programming, regardless of the language. They might just as well send
you to alt.english.usage since you're posting your message in English.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #80 D+ ADA N+++ |
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/

"'I' is the most beautiful word in the world."
   - John Nordberg



Sun, 20 Apr 2003 20:37:46 GMT  
 Windows client does not connect to Unix socket

Quote:

> >Which is off-topic here, please see comp.unix.programmer.<

> They sent me here as I am writing the code in C!

Then they're {*filter*}heads. This group is for ISO C, not for system-specific
extensions.

Richard



Sun, 20 Apr 2003 22:13:01 GMT  
 Windows client does not connect to Unix socket


Quote:
>I am learning socket programming on Linux (gcc).

This is off topic; sockets are not part of the C language, but rather an
operating system interface with a C binding.

Quote:
>The code works great when telneting from Unix terminals, but when I telnet
>from a Windows client the connection is dropped immediately.

>Am I missing something obvious here? Is there an incompatibility with
>Windows wheh trying to connect to a Unix socket on the server?

Hint: people use protocols over top of TCP/IP. In writing your server for
telnet clients, you forgot to implement the telnet protocol.  Another hint: the
Windows telnet client is complete, utter crap.


Mon, 21 Apr 2003 04:13:20 GMT  
 Windows client does not connect to Unix socket


Quote:
>>Which is off-topic here, please see comp.unix.programmer.<

>They sent me here as I am writing the code in C!

You are lying. I had a look in comp.unix.programmer, and I did not find such a
reply to your question.  I found one reply telling you to get a better Windows
telnet client; it did not mention comp.lang.c.

I noticed that you have been pestering comp.unix.programmer with a lot of
questions about platform-independent C basics like printf, va_list, malloc and
free and so on.  I can see why you would be redirected here for *those* topics.



Mon, 21 Apr 2003 04:19:30 GMT  
 Windows client does not connect to Unix socket
Quote:
>Another hint: the

Windows telnet client is complete, utter crap.<

That may be so. But if I want my server code running on Unix to support
connections from Windows clients I'll need to change it somehow.
The server code supports telnet connections from Unix.

Bruce



Mon, 21 Apr 2003 05:26:23 GMT  
 Windows client does not connect to Unix socket

Quote:

> >Another hint: the
> Windows telnet client is complete, utter crap.<

> That may be so. But if I want my server code running on Unix to support
> connections from Windows clients I'll need to change it somehow.
> The server code supports telnet connections from Unix.

If you want to write a telnet daemon, you'll have to implement the
Telnet protocol. Go to http://www.*-*-*.com/
search for the appropriate RFCs.
Once you see how much material that is, decide not to reinvent that
particular wheel and choose a smaller project.

Gergo

--
There's just something I don't like about {*filter*}ia; the state.



Mon, 21 Apr 2003 08:14:52 GMT  
 Windows client does not connect to Unix socket


Quote:
>>Another hint: the
>Windows telnet client is complete, utter crap.<

>That may be so. But if I want my server code running on Unix to support
>connections from Windows clients I'll need to change it somehow.
>The server code supports telnet connections from Unix.

So it's not a C issue, and it's not a UNIX issue. Hmm, I guess you are
off to some Windows newsgroup. Hope your news client supports rich text
and can view MS Word and Excel attachments. :)


Mon, 21 Apr 2003 11:41:54 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Client Socket waiting for Server Connect and set main thread on hold

2. about client socket in unix

3. Windows 95 Client fails to connect to remote pipe

4. Windows 98 can hold only 3x socket clients?

5. OnReceive not fired for a CCeSocket client socket

6. Socket exception when trying to connect to the socket

7. emulator connect fails if not connected to internet

8. How to receive from isapi/dll in a client windows rather than client browser

9. Windows Socket and Linux Socket

10. Client Server problem: CLIENT printerDC not available on SERVER

11. Problem doing signal handling on a UNIX machine

12. Help needed doing raw term i/o under Unix

 

 
Powered by phpBB® Forum Software