advanced socket programming

Thread Tools Search this Thread
Top Forums Programming advanced socket programming
# 1  
Old 02-17-2002
Question advanced socket programming

hi every one
my post is about socket programming
i would know if anyone knows about send binary file in peer to peer connection.
if you have any information about it plzzz contact me or reply my post
# 2  
Old 02-18-2002
You're asking for quite a bit here. As a starting point I would suggest reading a book. I like UNIX Network Programming by Rich Stevens.
# 3  
Old 02-25-2002
In principle, all communication is 'binary'
That said, you have some options when creating a socket:

These are some protocols from a Linux book:
AF_UNIX (Is my book old, has this one gotten a new name?)
AF_INET - the one you probably want :-)
AF_ISO - Some new stuff ...
AF_NS - Xerox

Then, some socket types:

SOCK_STREAM - probably most used, connection based
SOCK_DGRAM - very intersting, can be fast on LAN
SOCK_RAW - Maybe this is the one you want?
If you build a new protocol, you may use this?

In principle, sockets are used like files:

open, read/write, close.

So, to transfer a file, you would open and write in one end, and open, read and close in the other ... but you probably have something particular in mind ...??

This is a GROSS oversimplification, does not speak about bind(), listen(), accept(), etc. - but check socket(3SOCKET), it will contain links to the other relevant calls.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

Socket Programming

HI Can anyone provide me with codes for file transfer server to client or vice versa? Also please explain how to compile those programs in ubuntu terminal as i am totally new to socket programming. Thanks (1 Reply)
Discussion started by: mayhemtrigger
1 Replies

2. Homework & Coursework Questions

Trouble with Advanced Shell Programming

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am working on a hands on project. We are creating a script for a corporate phone list. The project I am... (2 Replies)
Discussion started by: SarahBelle7858
2 Replies

3. Programming

Socket programming

Hi everyone, I'm new to this forum. I'm working on new project for last few days and this forum already helped me on couple of occasions. I don't have any prior experience with network programming so I'll appreciate any advise given. I'm trying to do the following: 1. open user... (2 Replies)
Discussion started by: _thomas
2 Replies

4. UNIX for Dummies Questions & Answers

hi i need help with socket programming

in socket programming how can i : Create for example 3 blank files, namely: server, client, network •Server: act as servers/provider, will receive all requests from different client •Client: requesters •Network: middle-layer of communication between server & client any tips or... (6 Replies)
Discussion started by: kedah160
6 Replies

5. UNIX for Dummies Questions & Answers

Socket programming

in c socket programming, how can I send and received on the same port? (7 Replies)
Discussion started by: Peevish
7 Replies

6. Programming

help regarding socket programming

i m using sockets for setting up a connection between a server and a client. When the clients gets connected to the server, its ip is conveyed to the server through one of the predefined structures in c library... i save this ip address in an array....1st client's ip address goes to the zeroth... (1 Reply)
Discussion started by: abmxla007
1 Replies

7. Programming

Socket Programming

Hi , I'm facing the following problem in socket programming. My structure is struct { int i; char *str; }samp; I'm creating the pointer to this structure and assigning the value to the structure members and send via the socket to the another process. The receiver process when... (7 Replies)
Discussion started by: arunviswanath
7 Replies

8. IP Networking

socket programming

my system is a stand alone system... i want to try doing socket porgramming..ihave heard that this is usually done during testing... how can i do that....? (6 Replies)
Discussion started by: damn_bkb
6 Replies

9. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies

10. Programming

Socket Programming

Dear Reader, Is there any way to check up socket status other than 'netstatus ' Thanks in advance, (1 Reply)
Discussion started by: joseph_shibu
1 Replies
Login or Register to Ask a Question