From aaa4ad68fa305c5103df0b632edec573cbfe4d4a Mon Sep 17 00:00:00 2001 From: schnetter Date: Fri, 3 Jun 2005 12:46:23 +0000 Subject: 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 --- README | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'README') diff --git a/README b/README index 3c017d2..7225e3c 100644 --- a/README +++ b/README @@ -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; -- cgit v1.2.3