mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +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
e3e3d3ce4f
commit
918f664f8b
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…
Add table
Add a link
Reference in a new issue