03-18-2009
Never used it myself but I understand from the man page that ksh93 has built-in support
for direct socket access provided your platform supports sockets in the form /dev/tcp
/hostid/portid and /dev/udp/hostid/portid where hostid is the dotted decimal number of
the host and portid is the port the server is listening on.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi guys ,
As you know normally ' read ' statement waits
for the user to press enter and then terminates
the input .............
Can anyone of u tell me how do i read a
single character from input without waiting
for the user to press enter ................
Thanks,
Nagesh. (2 Replies)
Discussion started by: nageshrc
2 Replies
2. Shell Programming and Scripting
Now, am in a very tight situation here. I really dont expect anyone to understand but please, try your best.
am trying to right a program that goes back to the previous entry to correct a mistake.
heres what am trying to do. i write a program like this
Name : James Holgston... (1 Reply)
Discussion started by: TRUEST
1 Replies
3. Shell Programming and Scripting
Hellow every body
I am trying to write a very simple script in an executable file as following
if ($?PWD) then
echo "OK"
else
echo "No"
endif
but I am getting error during execution in c shell as
synthax error at line 4 , unexpected end of file
Please advise (2 Replies)
Discussion started by: Reza Nazarian
2 Replies
4. Programming
I am programming the following simple shell program. It works for the most part, things like 'ls' and 'ps' work just fine. However when I add options, (example, ls -l) it does not execute the command. Also, I've been trying to add an "exit" command, so that I don't have to use the iterrupt; but... (3 Replies)
Discussion started by: TexasGuy
3 Replies
5. Shell Programming and Scripting
How to write a shell script which takes 3 strings as positional parameters,first and second are file names and third is a directory.if the two files exist in `pwd` and they contain a specific pattern and their size is greater than 32 bytes,moves these files into directory? (1 Reply)
Discussion started by: rameshparsa
1 Replies
6. Shell Programming and Scripting
in the beginners book i have it gives an exercise to try. saying to make a script that examines the time. it should keep examining every second or so and say some sort of message. Can anyone help me get going.
Thanks (3 Replies)
Discussion started by: bebop1111116
3 Replies
7. Shell Programming and Scripting
Hello everyone.
(I have found in this forum lots of infos about closing socket in c, and others lenguages but never with shell-command)
Im developing a tool over tcl/tk; in this application i open a socket to communicate with a ada application.
In the init script i open both programs (tcl... (2 Replies)
Discussion started by: trutoman
2 Replies
8. Shell Programming and Scripting
Hi all,
I am trying to get a file from an ftp server and i have the list of files which needs to be get from the ftp server.
grep unix_prg*.* log.txt > log1.txt
log1.txt (which has the list of files)
06-29-09 00:00AM 3550258 unix_prg090629
06-28-09 07:00PM ... (7 Replies)
Discussion started by: raghav1982
7 Replies
9. Homework & Coursework Questions
Hi all,
I have an assignment from school to write a shell program in linux. the idea is to exercise fork() and execv() functions.. the shell program is supposed to be the master and every command that the user prints will run in a new process. we also need to try running the command in every... (1 Reply)
Discussion started by: r3vive
1 Replies
10. Homework & Coursework Questions
1. I've have to write a shell program that accepts Ctrl+T (in linux os in c language) and should print out the current time and date to the screen. I've written the following code but i've to type ^T individual rather than pressing ctrl+T(^T) to get the output. :
2. How do i make the shell... (2 Replies)
Discussion started by: zorro_phu
2 Replies
LEARN ABOUT DEBIAN
log::handler::output::socket
Log::Handler::Output::Socket(3pm) User Contributed Perl Documentation Log::Handler::Output::Socket(3pm)
NAME
Log::Handler::Output::Socket - Send messages to a socket.
SYNOPSIS
use Log::Handler::Output::Socket;
my $sock = Log::Handler::Output::Socket->new(
peeraddr => "127.0.0.1",
peerport => 44444,
proto => "tcp",
timeout => 10
);
$sock->log(message => $message);
DESCRIPTION
With this module it's possible to send messages over the network.
METHODS
new()
Call "new()" to create a new Log::Handler::Output::Socket object.
The following options are possible:
peeraddr
The address of the server.
peerport
The port to connect to.
proto
The protocol you wish to use. Default is TCP.
timeout
The timeout to send message. The default is 5 seconds.
persistent and reconnect
With this option you can enable or disable a persistent connection and re-connect if the connection was lost.
Both options are set to 1 on default.
dump
Do you like to dump the message? If you enable this option then all messages will be dumped with "Data::Dumper".
dumper
Do you want to use another dumper as "Data::Dumper"? You can do the following as example:
use Convert::Bencode_XS;
dumper => sub { Convert::Bencode_XS::bencode($_[0]) }
# or maybe
use JSON::PC;
dumper => sub { JSON::PC::convert($_[0]) }
connect
This option is only useful if you want to pass your own arguments to "IO::Socket::INET" and don't want use "peeraddr" and "peerhost".
Example:
connect => {
PerrAddr => "127.0.0.1",
PeerPort => 44444,
LocalPort => 44445
}
This options are passed to "IO::Socket::INET".
log()
Call "log()" if you want to send a message over the socket.
Example:
$sock->log("message");
connect()
Connect to the socket.
disconnect()
Disconnect from socket.
validate()
Validate a configuration.
reload()
Reload with a new configuration.
errstr()
This function returns the last error message.
PREREQUISITES
Carp
Params::Validate;
IO::Socket::INET;
Data::Dumper;
EXPORTS
No exports.
REPORT BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>.
If you send me a mail then add Log::Handler into the subject.
AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
COPYRIGHT
Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-11-21 Log::Handler::Output::Socket(3pm)