08-26-2002
Quote:
Originally posted by Perderabo
I'm not sure that I understand the question. But you can read() and write() to a socket, however a properly constructed read() or write() call must include the address of a buffer for the data.
Is it possible to use a buffer size of only 1 element? I bet he wants to eliminate any lag related to send/receive with unfilled buffers. I ran into a similiar situation years ago with a bar code reader. I don't remember how I solved the problem (and it was under Win32 anyway).
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all
I wander of there is small utility that gives me the possibility to download direct links to specific folder
say if i have http://www.blah.com/foo.java and I like to download the foo.java without opening the browser and such... (2 Replies)
Discussion started by: umen
2 Replies
2. Shell Programming and Scripting
Hi,
I have a pipe delimited file with 1 million records. I need to validate each line by counting the number of delimiters, if any line fails to have the specified number of delimiters, taat line has to be sent to a reject file.
Kindly suggest.
if code provided, it is highly appreciated, and... (22 Replies)
Discussion started by: anandapani
22 Replies
3. Shell Programming and Scripting
:wall::wall::wall:
Hi I have horrible script below, need help in renaming ls -l output into new filename format:
Desired output:
cp -pv original_path/.* newDirectory/owner_of_file.%dd%mm%y.file_extension.first_8_characters_of_original_filename
localuser@localuser:~ vi... (3 Replies)
Discussion started by: wolf@=NK
3 Replies
4. Shell Programming and Scripting
Hai Friends,
Please help me in providing unix shell script for pulling data from mainframe dataset to unix using connect direct (NDM).
Thanks in advance (1 Reply)
Discussion started by: karthikm
1 Replies
5. Shell Programming and Scripting
Hi guys,
been scratching round the forums and my mountain of resources.
Maybe I havn't read deep enough
My question is not how sed edits a stream and outputs it to a file, rather something like this below:
I have a .txt with some text in it :rolleyes:
abc:123:xyz
123:abc:987... (7 Replies)
Discussion started by: the0nion
7 Replies
6. Shell Programming and Scripting
I want to list files that end with .c in the direct subdirectory of the current directory. I have tried the following command:
find ./ -mindepth 2 -maxdepth 2 -name "*.c"
Is that right? Or is there any easier way to handle that problem?
Another problem is that I want to grep in a file to find... (5 Replies)
Discussion started by: Ray Sun
5 Replies
7. Homework & Coursework Questions
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:
We must do the following for a massive coding project that is due at 12:20PM on Monday, July 22, 2013. We are to... (1 Reply)
Discussion started by: kowit010
1 Replies
8. Solaris
I have problem with oracle solaris 10 running on oracle sparc T4-2 server.
Os information: 5.10 Generic_150400-03 sun4v sparc sun4v
Output from tcpstat.d script
TCP bytes: out outRetrans in inDup inUnorder
6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies
9. UNIX for Advanced & Expert Users
Dear Expert Users,
I know that Unix utility ( fuser ) is used to detect "transmission" of files from Source system to "current Linux Server".
I have scheduled this Unix script to work every 30th minutes of the hour and whenever files transmission starts at that very moment.
And, the file... (4 Replies)
Discussion started by: schandrakar1
4 Replies
10. Shell Programming and Scripting
Hello all,
i have a code in which when doing a for loop, i need to direct the output to two files, one just a single output, the other to always append (historical reasons).
So far i managed to do the following, which is working, but am still considering it as "dirty".
... (4 Replies)
Discussion started by: nms
4 Replies
UDP(7P) UDP(7P)
NAME
UDP - Internet User Datagram Protocol
SYNOPSIS
DESCRIPTION
UDP is a simple, unreliable datagram protocol used to support the socket type for the internet protocol family. UDP sockets are connec-
tionless, and are normally used with the and calls (see send(2) and recv(2). The call can also be used to simulate a connection (see con-
nect(2). When used in this manner, it fixes the destination for future transmitted packets (in which case the or system calls can be
used), as well as designating the source from which packets are received. The and calls can be used at any time if the source of the mes-
sage is unimportant.
UDP address formats are identical to those used by TCP. In particular, UDP requires a port identifier in addition to the normal Internet
address format. Note that the UDP port domain is separate from the TCP port domain (in other words, a UDP port cannot be connected to a
TCP port).
The default send buffer size for UDP sockets is 65535 bytes. The default receive buffer size for UDP sockets is 2147483647 bytes. The
send and receive buffer sizes for UDP sockets can be set by using the and options of the system call or the and options of the system call.
The maximum size for these buffers is 2147483647 bytes. The maximum receive buffer size may be lowered using the parameter
The maximum message size for a UDP datagram socket is limited by the lesser of the maximum size of an IP datagram and the size of the UDP
datagram socket buffer. The maximum size of an IP datagram limits the maximum message size of a UDP message to 65507 bytes. Therefore,
using the maximum socket buffer size will allow multiple maximum-sized messages to be placed on the send queue. The default inbound and
outbound message size limit for a UDP datagram socket is 65535 bytes.
The maximum message size for a UDP broadcast is limited by the MTU size of the underlying link.
ERRORS
One of the following errors may be returned in if a socket operation fails. For a more detailed list of errors, see the man pages for spe-
cific system calls.
[EISCONN] Attempt to send a datagram with the destination address specified, when the socket is already connected.
[ENOBUFS] No buffer space is available for an internal data structure.
[EADDRINUSE] Attempt to create a socket with a port which has already been allocated.
[EADDRNOTAVAIL] Attempt to create a socket with a network address for which no network interface exists.
AUTHOR
The socket interfaces to UDP were developed by the University of California, Berkeley.
SEE ALSO
ndd(1M). getsockopt(2), recv(2), send(2), socket(2), t_open(3), t_optmgmt(3) inet(7F), socket(7),
RFC 768 User Datagram Protocol
RFC 1122 Requirements for Internet hosts
UDP(7P)