mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Use @"" constant strings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@193 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1999fd09be
commit
dbdd04782f
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <stdio.h>
|
||||
#include <objects/SocketPort.h>
|
||||
#include <objects/String.h>
|
||||
|
||||
#define MSG "Hello from a client SocketPort."
|
||||
#define BUFFER_SIZE 80
|
||||
|
@ -13,9 +14,10 @@ int main(int argc, char *argv[])
|
|||
id rp;
|
||||
|
||||
if (argc > 1)
|
||||
remotePort = [SocketPort newRemoteWithNumber:3 onHost:argv[1]];
|
||||
remotePort = [SocketPort newRemoteWithNumber:3
|
||||
onHost:[String stringWithCString:argv[1]]];
|
||||
else
|
||||
remotePort = [SocketPort newRemoteWithNumber:3 onHost:""];
|
||||
remotePort = [SocketPort newRemoteWithNumber:3 onHost:@""];
|
||||
|
||||
strcpy(b, MSG);
|
||||
[localPort sendPacket:b length:strlen(b)
|
||||
|
|
Loading…
Reference in a new issue