03-22-2011
Socket Programming file sending
Hello everyone,,
I am doing one socket programming.Is it possible to send one file from client to server without using buffer??.I am sending tar files.
Thanks in Advance
10 More Discussions You Might Find Interesting
1. Programming
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
2. UNIX for Advanced & Expert Users
Hi,
I am trying to connect to more than 60 servers to perform some actions remotely. for this I am using ssh2. But its taking lot of time.
Though i am running the command in background, still its taking long time to execute..
Any one let me know can we use sockets instead of ssh2 for... (3 Replies)
Discussion started by: pvamsikr
3 Replies
3. Programming
Hi,
I wanted to write a socket program in C, where I always want my socket connected to the server. i.e i shouldn't get disconnected once i get the response back from the server. I want to work in the connected mode, instead of disconnect and connect.
Can somebody please kindly provide me a... (3 Replies)
Discussion started by: sudharma
3 Replies
4. Programming
Hello my friends;
Look at this 2 program:
Client:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int main ( int agrc, char *argv )
{
int Socket;
struct sockaddr_in... (5 Replies)
Discussion started by: htabesh
5 Replies
5. UNIX for Dummies Questions & Answers
in c socket programming, how can I send and received on the same port? (7 Replies)
Discussion started by: Peevish
7 Replies
6. UNIX for Dummies Questions & Answers
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
7. UNIX for Advanced & Expert Users
my socket program is not working with larger port numbers like more than 60000 , any reason why ? (4 Replies)
Discussion started by: Gopi Krishna P
4 Replies
8. Programming
hi, i am newbie of socket. i want to ask some question. if i want to send file from client to server, how do i do? and if i want to send file from server to client, how do i do?
any pro help me and if possible, you can post code for an example
i need it very much
thank you for helping me:)... (1 Reply)
Discussion started by: tung1984
1 Replies
9. Programming
hi
am senthil
am developing a software to send and receive SMS using HTTP connection
first of all am forming a URL and sending that URL to a remote server using my Client Program
i send that url through Socket(using Send() Function)
if i send more than one URL one by one using the same... (0 Replies)
Discussion started by: senkerth
0 Replies
10. Shell Programming and Scripting
hi
am senthil
am developing a software to send and receive SMS using HTTP connection
first of all am forming a URL and sending that URL to a remote server using my Client Program
i send that url through Socket(using Send() Function)
if i send more than one URL one by one using the same... (4 Replies)
Discussion started by: senkerth
4 Replies
LEARN ABOUT DEBIAN
rfiosetopt
RFIOSETOPT(3) Rfio Library Functions RFIOSETOPT(3)
NAME
rfiosetopt - set RFIO options
SYNOPSIS
#include <sys/types.h>
#include "rfio_api.h"
int rfiosetopt (int opt, int *pval, int len)
int rfio_setbufsize (int s, int bufsize)
DESCRIPTION
rfiosetopt sets the RFIO option opt to the content of the memory cell pointed by pval.
rfio_setbufsize sets the size of the readahead buffer to be used on a particular socket connection.
opt can have on of the following values:
RFIO_READOPT
The value pointed by pval can be 0, RFIO_READBUF, RFIO_READAHEAD or RFIO_STREAM (V3).
If set to zero, a normal read will be used (one request to the server per read).
If set to RFIO_READBUF, an internal buffer is allocated in the client API, each call to the server fills this buffer and the
user buffer is filled from the internal buffer. There is one server call per buffer fill.
If set to RFIO_READAHEAD, an initial call is sent to the server which pushes data to the client buffer until end of file is
reached or an error occurs or a new request comes from the client. There is no intermediate buffer unless RFIO_READ-
BUF|RFIO_READAHEAD is specified.
If RFIO_STREAM is set, the V3 protocol is enabled. This uses 2 socket connections between the client and the server and the
server itself is multi-threaded allowing overlap of disk and network operations. The data is pushed on the data socket until
end of file is reached or an error occurs. The transfer can be interrupted by sending a packet on the control socket.
Default is RFIO_READBUF.
The default internal buffer size is 128kB, but the buffer size can be set with an entry RFIO IOBUFSIZE in shift.conf or thru
the environment variable RFIO_IOBUFSIZE.
RFIO_NETOPT
The value pointed by pval can be RFIO_NONET or RFIO_NET. If set to RFIO_NONET, the NET entries in shift.conf are ignored.
Default is RFIO_NET.
RFIO_NETRETRYOPT
The value pointed by pval can be RFIO_RETRYIT or RFIO_NOTIME2RETRY.
If set to RFIO_RETRYIT, there will be retries on failing connect. The number of retries is given by the environment variable
RFIO_CONRETRY or the RFIO CONRETRY entry in shift.conf. The retry interval (in seconds) is given by the environment variable
RFIO_CONRETRYINT or the RFIO CONRETRYINT entry.
If set to RFIO_NOTIME2RETRY, there will be no retry on failing connect.
Default is RFIO_RETRYIT.
RFIO_CONNECTOPT
The value pointed by pval can be RFIO_NOLOCAL or RFIO_FORCELOCAL. If set to RFIO_FORCELOCAL, no parsing is done on pathname.
The file is assumed to be local. Default is RFIO_NOLOCAL.
The len argument is ignored.
s is the file descriptor of the receiving socket.
bufsize is the size of the readahead buffer to be used.
RETURN VALUE
rfiosetopt returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.
ERRORS
ENOMEM buffer could not be allocated.
EINVAL opt is not a valid option, bufsize is negative or the user tries to change the buffer size after the actual I/O has started.
SEE ALSO
rfio_open(3), rfioreadopt(3)
AUTHOR
LCG Grid Deployment Team
LCG
$Date: 2010-02-15 10:01:40 +0100 (Mon, 15 Feb 2010) $ RFIOSETOPT(3)