<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ralph Mitchell wrote:
<blockquote
cite="mid:997a524e0803201822w6bd6595dg5b7243e4088860b3@mail.gmail.com"
type="cite">On Thu, Mar 20, 2008 at 5:43 PM, Charles Jones <<a
moz-do-not-send="true" href="mailto:jonescr@cisco.com">jonescr@cisco.com</a>>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Henrik,<br>
<br>
I'm talking about the connection protocol, not the message protocol. So
that I can write code that can connect to a BBDISPLAY and send/receive
data, without shelling out and using a bb binary. I've tried
telnetting to port 1984 and typing various commands, and also using
netcat, none of which seem to work, so I suspect that hobbitd is
expecting to see some certain characters before it will accept a
command.<br>
<font color="#888888"><br>
-Charles</font></div>
</blockquote>
</div>
<br>
<br>
Would bb.pl be of any use to you?? As found on <a
moz-do-not-send="true" href="http://deadcat.net">deadcat.net</a>:<br>
<br>
sub bb_send {<br>
my ($bbdisp, $machinelist, $message) = @_;<br>
my (%machine, @machinelist) = ();<br>
@machinelist = ($bbdisp ne "<a moz-do-not-send="true"
href="http://0.0.0.0">0.0.0.0</a>") ? ($bbdisp) : @$machinelist;<br>
for my $server (@machinelist) {<br>
my ($port, $iaddr, $paddr, $proto); # Variable réseau<br>
# don't send the message twice to the same machine<br>
next if $machine{$server};<br>
$machine{$server} = 1;<br>
debug("Host: $server\n");<br>
$iaddr = inet_aton($server) || warn "bb: Unknown
host: $server\n", next;<br>
$paddr = sockaddr_in($PORT, $iaddr);<br>
$proto = getprotobyname('tcp');<br>
socket(SOCK, PF_INET, SOCK_STREAM, $proto) || warn "bb: Can't open
stream socket\n", next;<br>
connect(SOCK, $paddr) || warn "bb: CAN'T
CONNECT TO bbd SERVER @ $server", next;<br>
# select((select(SOCK), $| = 1)[0]); # unbuffer the socket<br>
print SOCK $message;<br>
close (SOCK);<br>
}<br>
}<br>
</blockquote>
<br>
Indeed! From looking at that code, it is just a simple TCP
connection...Hmm I guess I need to go see why my test code didn't work
:-) Thanks!<br>
<br>
-Charles<br>
</body>
</html>