Using SocketsHi,
I'm trying to use sockets to make a multyplayer game server-client
My problem is that I don't know how to work with stThreadBlocking.
I know that the server need to have a thread for each client and when a
client connects to the server a thread is created and waits for new data my
probme is:
how can I create the thread class data?
how can I know if the thread is waitng to read or to write?
can I send streams?
and wich events to use with thread based server?
I looked for examples of this on the internet but didn't found anything
useful, is there anyone that c...
How to use the sockets?Hi,
I've gathered that Rakudo now implements sockets, and I wanted to do
some basic data shuffling for testing purposes. Could anybody point me
to a really simple, working example?
I tried to cargo-cult it from Web.pm
(<http://github.com/masak/web/blob/c6f53b76241d3c16bcc356dfe555d055f2f0ecfa/lib/HTTP/Daemon.pm>):
use v6;
my $l = IO::Socket::INET.socket(2, 1, 6).bind('127.0.0.1', 1234);
my $s = $l.accept();
That dies on the last line, with
Null PMC access in isa()
current instr.: '!CALLMETHOD' pc 18912 (src/builtins/guts.pir:80)
called from Sub...
Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan
Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { ...
use SocketHow is it possible to bind the Socket module to another IP, other than the
box's default IP? I want the perl program to connect using a configurable IP
that's available on the box. I've read though the perldoc for the module,
and couldn't find anything (if there is something there then I missed it).
All help appreciated
Dan
...
When to use ( and when to use ((?I'm just not getting it.
When do you use ( in a statement, when do you need to use ((, and is
the space after either or both mandatory?
For example, I coded this statement:
if (( $_ eq $bad_guys_ip )) { more_stuff_here };
Why the two (( in an if? And why does it seem to not work when I miss
the space after the ((?
Thanx!
Mark me as...
/Corn-fused|Dense/
> I'm just not getting it.
>=20
> When do you use ( in a statement, when do you need to use ((, and is
> the space after either or both mandatory?
>=20
> For example, I coded this sta...
How to use Sockets?
Two applications, one in VC++ 6.0, the other in VB.NET,
Can I use sockets to make them talk to each other? How?
Thanks a lot
Well you could, but it isn't the most efficient mechanism on the same machine.
The other question is what mechanisms, if any, are already in these apps now?
If sockets are already there, but COM and nothing else is, then ok use sockets.
If COM (or something else) is there, then it would be better to stick with COM.
If neither is there, then COM would be the easiest solution to retrofit on both.
There are certainly other options too, but unless th...
TX and RX using socket (Ethernet port) using BCB C++ 2006 Edition [Edit]Hi All,
I'm using BCB C++ 2006 edition. Kindly let me know how to carry out TX and RX in sockets(C++ Builder). I'm a newbee to the BCB world.
Kinly post the code or pseudocode if possible.
Thanks.
Edited by: guddappa th on Jan 5, 2011 8:09 AM
...
How to use the arguments to use() in the package being usedHowdy,=20
The subject says it all believe it or not :)
What I'm trying to figure out is how to pass an argument=20
(pragma I believe is the proper term) to use() and do=20
sonethign in the package based on it.
I've looked at CGI.pm source but can't seem to track it down.=20
(Similar idea as to CGIs -oldstyle_urls -newstyel_urls)
http://search.cpan.org/~lds/CGI.pm-3.04/CGI.pm#PRAGMAS
What I'd like to do is something like this:
# for old time's sake we'll just use our favorite module
use Foo::Monkey qw(:Foo :Bar -doamazingthings);
#then in Foo::Monkey...
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
Hi Guys Getting this error whe try to connect godaddy mysql database. My connection string is
string connectionString = "Server=proxy.shr.secureserver.net;Port=9999; Database=xxxx; Uid=xxxx; Pwd=xxxxxx;Pooling=false;Pooling=false"; How to fix this.
Pl. help.
Thanks.
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more informat...
Email using socket
Hi All,Can i send email using socket in visual web developer 2005(VB). Thanks
You can use the .NET API to do the same, which internally uses sockets. Check this blog post:http://geekswithblogs.net/vivek/archive/2007/04/09/111157.aspxHope this helps,Vivek Social Networking Platform in ASP.NET || Join now: CodeASP.NET Community Please mark the most helpful reply/replies as "Answer".
You can certainly use the Socket class to connect to an SMTP server in order to send an e-mail, but by far the most easy way is to use the MailMessage class, as it wraps all the functi...
Using sockets with PowerbuilderI need to do a socket application to communicate with other
application. How can I do this with Powerbuilder 10
Thanks for your support
David Ochoa wrote:
> I need to do a socket application to communicate with other
> application. How can I do this with Powerbuilder 10
>
> Thanks for your support
Try
http://www.dart.com/downloads/
a.
Try the Winsock example in the free code section of
http://www.topwizprogramming.com/
<David Ochoa> wrote in message news:445156ff.2ed6.1681692777@sybase.com...
>I need to do a socket application to communicate wit...
Using socket in perlHello all,
I'm writing a server and a client in perl. My client communicates with
the server using sockets.
I'm using IO::Socket::INET to create the sockets.
My problem is that when my client close the socket, the expressions
"while ($line = <$client>)" is an infinite loop and $line contains "\n";
How can I know in the server when a client close a connection ?
Thanks for your help
(If it's not the right mailing list for this problem, what mailing list
should I use ?)
Xavier
> -----Original Message-----
> From: Xavier Ambrosioni [...
Using Raw SocketsAs part of a project at college i want to demonstrate creating packets using
raw sockets to create a conventional ICMP packet and send it from one
machine to one directly next to it to show the class that it works.
Does anyone have any source code (preferably C/C++) which creates packets
using raw sockets, or know where i can get one. I have already discovered
that I will need admin privilages on the 2k lab machine. Surprisingly i
have been given access to this su account for the duration of the class (30
mins! - WOW).
--
Thanks lots
You don't need raw sockets to send ...
Download using socketsI have tried to convert Mike Shkolnik's download program from Delphi to C++
as follows
void DownloadFile(String strHost, String strRemoteFileName,
String strLocalFileName, TClientSocket *clientSocket)
{
String s, forward;
int intReturnCode;
PChar pszBuffer;
TFileStream *fileOut = new TFileStream(strLocalFileName,
Classes::fmCreate);
if (strRemoteFileName[1] != '/')
{
forward = '/';
strRemoteFileName = forward + strRemoteFileName;
}
try
{
clientSocket->Host = strHost;
clientSocket->ClientType = ctBlocking;
clie...
How to use IO::SocketOver the long haul I've made a couple of programs that use sockets but still I
don't understand to very basics of it yet. That is how to properly send and
receive the data. So far what I have been doing is thus:
$client = IO::Socket::INET->new('server');
while (<$client>) {
chomp;
next unless $_;
.....
But doing it that way I sometimes have weirdness where I receive nothing yet
the 'next unless' statement doesn't catch it for some reason. For sending I
usually just print to the $client variable like a filehandle. I'm just
wonder...