diff options
author | schnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f> | 2005-06-03 12:46:23 +0000 |
---|---|---|
committer | schnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f> | 2005-06-03 12:46:23 +0000 |
commit | aaa4ad68fa305c5103df0b632edec573cbfe4d4a (patch) | |
tree | 371ff3642d14571e14cb9d671c4ed7455ae39bc7 /README | |
parent | 1e1ad189405f1f99ecf659bf107249aac5b823af (diff) |
Do not mess with sockets in C or C++. Defer this to perl. Create a
perl script at run time, pass the data it, and call it.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@36 83718e91-0e4f-0410-abf4-91180603181f
Diffstat (limited to 'README')
-rw-r--r-- | README | 33 |
1 files changed, 0 insertions, 33 deletions
@@ -44,41 +44,8 @@ implement reductions implement missing data types output only if value has changed -put stuff into namespace - (move from C to C++?) rename "file", "storage" do something more unique update the source tarballs not only when the thorn library changes, but also when a *.ccl or make.* file changes. do not necessarily update them all when the bindings change. - - - -Here is a suggestion for handling sockets in perl. -This is from "http://www.infocopter.com/perl/socket-server.htm". - -#!/usr/bin/perl -w -use strict; -################################################ -# Socket Client -# (c) retoh :) -################################################ -use Socket; - -my $host = 'localhost'; -my $port = 7890; - -my $proto = getprotobyname('tcp'); -socket(my $FS, PF_INET, SOCK_STREAM, $proto); -my $sin = sockaddr_in($port, inet_aton($host)); -connect($FS, $sin) || exit -1; - -my $old_fh = select($FS); $| = 1; select($old_fh); - -print $FS "Hello at ", scalar localtime(), "\n\n"; - -while(<$FS>) { - print; -} - -close $FS; |