03-22-2011
Which language do you use? In principle it is of course possible, e.g. using getchar to read from a file and then putchar to write to the socket (in C)
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
PUTC(3) BSD Library Functions Manual PUTC(3)
NAME
fputc, putc, putchar, putc_unlocked, putchar_unlocked, putw -- output a character or word to a stream
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdio.h>
int
fputc(int c, FILE *stream);
int
putc(int c, FILE *stream);
int
putchar(int c);
int
putc_unlocked(int c, FILE *stream);
int
putchar_unlocked(int c);
int
putw(int w, FILE *stream);
DESCRIPTION
The fputc() function writes the character c (converted to an ``unsigned char'') to the output stream pointed to by stream.
putc() acts essentially identically to fputc(), but is a macro that expands in-line. It may evaluate stream more than once, so arguments
given to putc() should not be expressions with potential side effects.
putchar() is identical to putc() with an output stream of stdout.
The putc_unlocked() and putchar_unlocked() functions provide functionality identical to that of putc() and putchar(), respectively, but do
not perform implicit locking of the streams they operate on. In multi-threaded programs they may be used only within a scope in which the
stream has been successfully locked by the calling thread using either flockfile(3) or ftrylockfile(3), and may later be released using
funlockfile(3).
The putw() function writes the specified int to the named output stream.
RETURN VALUES
The functions, fputc(), putc() and putchar() return the character written. If an error occurs, the value EOF is returned. The putw() func-
tion returns 0 on success; EOF is returned if a write error occurs, or if an attempt is made to write a read-only stream.
SEE ALSO
ferror(3), fopen(3), getc(3), stdio(3)
STANDARDS
The functions fputc(), putc(), and putchar(), conform to ANSI X3.159-1989 (``ANSI C89''). The functions putc_unlocked() and
putchar_unlocked() conform to ISO/IEC 9945-1:1996 (``POSIX.1'').
HISTORY
The functions putc(), putchar(), and putw() first appeared in Version 6 AT&T UNIX. The function fputc() appeared in Version 7 AT&T UNIX.
BUGS
The size and byte order of an int varies from one machine to another, and putw() is not recommended for portable applications.
BSD
May 6, 2010 BSD