On Wednesday, 2 April 2014 at 21:54:58 UTC, FreeSlave wrote:
It's only server. Maybe problem is on client side.
Yes, it is only a server which needs to answer back the client;
And there was the problem: I was not fetching the client's
address, and since UDP is an unconnected protocol, I
It's only server. Maybe problem is on client side.
Try this if you are on Linux:
//Linux C client
#include sys/socket.h
#include sys/types.h
#include netinet/in.h
#include arpa/inet.h
#include stddef.h
#include string.h
#include stdio.h
int main()
{
int sock, res;
struct sockaddr_in
Alexandre L.:
Some comments on your code:
Here's my 'server' code:
int main(string[] args)
{
If you don't need args, then I suggest to not put it as main
argument. So probably this is better (note no int nor return, in
D they are not needed):
void main() {
...
}
int
On Wednesday, 2 April 2014 at 00:34:08 UTC, bearophile wrote:
char[] rep = regan\0.dup;
s.send(cast(ubyte[])rep);
casts are dangerous, because they silently assume you know what
you are doing. As first try I suggest you to remove every
cast()
My bad; It returns immutable(char)*.
Still won't work with send(); Am I right to supposed the
receiving client must handle a ubyte[] as well (C++) ?
Jimi_Hendrix wrote:
Hi, I am new to D but not to programming. I have had some socket experience
before. How would i connect to a server using sockets in D? A link to a D
socket tutorial (if one exists) would also be appreciated.
by the way, first post to a newsgroup for me
As certain
On Fri, 03 Apr 2009 04:19:10 +0400, Jimi_Hendrix myspo...@gmail.com wrote:
Hi, I am new to D but not to programming. I have had some socket
experience before. How would i connect to a server using sockets in D?
A link to a D socket tutorial (if one exists) would also be appreciated.
by
On Fri, 03 Apr 2009 04:35:21 +0400, Denis Koroskin wrote:
I'd suggest you to look at Tango as it has very impressive networking
feature set.
tutorial? also what do i need to download to use tango?
On Fri, 03 Apr 2009 04:55:59 +0400, jimi hendrix myspo...@gmail.com wrote:
On Fri, 03 Apr 2009 04:35:21 +0400, Denis Koroskin wrote:
I'd suggest you to look at Tango as it has very impressive networking
feature set.
tutorial? also what do i need to download to use tango?