SOCKETS and SOLARIS 
Author Message
 SOCKETS and SOLARIS

I am trying to port some SunOS code using sockets to Solaris (2.5)
but am having loads of trouble... I keep getting Protocol errors.

Does anyone have any experience with opening/using sockets in
Solaris and may be able to help me out?

I have everything well defined, using the socket, then bind, then accept
command for the server, and it is dying when I implement the ACCEPT
call.

Any takers? :)  I can really use the help!

Thanks
Joe
Student for Life



Sat, 05 Jun 1999 03:00:00 GMT  
 SOCKETS and SOLARIS

In comp.lang.c

Quote:

>I have everything well defined, using the socket, then bind,
>then accept command for the server, and it is dying when I
> implement the ACCEPT call.

The sequence is socket(), bind(), listen(), accept()

Bruce



Sun, 06 Jun 1999 03:00:00 GMT  
 SOCKETS and SOLARIS

Quote:

>I am trying to port some SunOS code using sockets to Solaris (2.5)
>but am having loads of trouble... I keep getting Protocol errors.

Sockets are well beyond the scope of the C language - try
comp.unix.programmer.

--
-----------------------------------------


-----------------------------------------



Sun, 06 Jun 1999 03:00:00 GMT  
 SOCKETS and SOLARIS

So what does this mean,

That discussing sockets in c programming is off the board, or that from
C there is no way to program for sockets?

The entire Real Audio player is programed in C and surely makes a few
socket calls.



Sun, 06 Jun 1999 03:00:00 GMT  
 SOCKETS and SOLARIS

Quote:

>So what does this mean,

>That discussing sockets in c programming is off the board, or that from
>C there is no way to program for sockets?

  Both.  Because there is no way to write socket code in C, discussion of
socket code is "off the board."

Quote:
>The entire Real Audio player is programed in C and surely makes a few
>socket calls.

  The program then makes several calls to the underlying OS's API, or
directly to the hardware.  Since the C language doesn't define either OS
APIs or hardware interfaces, questions about these are more appropriate
in newsgroups that talk about the compiler, OS, or hardware.
  In this case, since C doesn't define "sockets" but UNIX does, a UNIX
newsgroup is the more appropriate choice to ask questions about socket
programming.

--
The Amorphous Mass         If I knew what I was doing,



Sun, 06 Jun 1999 03:00:00 GMT  
 SOCKETS and SOLARIS

Quote:

>So what does this mean,

>That discussing sockets in c programming is off the board, or that from
>C there is no way to program for sockets?

The former. There is a way to use sockets from C; however there are also ways
to use sockets from Perl, fortran, Ada, TCL and other languages.  Sockets are
language-independent operating system objects.

But that's beside the point, because files are also such system objects,
yet file I/O (using the standard C library) is within the scope of the language.

What it boils down to is this: the C language standard doesn't define
any sort of library interface for networking, and hence such an interface
can exist only as a system-specific extension to the language.

We don't discuss extensions at length, because the possibilities for extensions
are endless, and call for a lot of domain specific knowledge that is irrelevant
to C. If we started discussing 3D rendering libraries for C programmers, we
would soon be lost in computer graphics jargon having little to do with C,
wouldn't we? Classical optics, atmospheric effects, interpolated shading,
radiosity, image mapping, NURBs... Great stuff, but really not suited
for a newsgroup called comp.lang.c. This sort of discussion would only
split the newsgroup participants, who otherwise share a common interest
in the C language, into small factions.

There is a legitimate need for newsgroup that is dedicated to the C language,
rather than specific problem domains where the C language can be put to
good use (among other languages, of course). The comp.lang.c hierarchy
meets that need.



Mon, 07 Jun 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Dead sockets in Solaris?

2. How to bind sockets in Solaris (correction)

3. Socket program using gcc on SUN Solaris 2.5.1

4. How to bind sockets address in Solaris?

5. gcc binaries for Solaris 2.6 or any C/C++ Compiler for Solaris

6. Async socket writers combined with sync socket readers

7. socket.Send and socket.Receive at the same time

8. how to use socket in dotnet,how to get some info about socket

9. System.Net.Sockets.Socket and IPv6

10. Socket exception when trying to connect to the socket

11. Socket.Send Socket.Receive

12. send socket from socket

 

 
Powered by phpBB® Forum Software