corelibrary-help Mailing List for CoreLibrary
Brought to you by:
thorlist
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Aleksandra C. <ale...@gm...> - 2006-05-04 12:31:10
|
I have sent this mail 3 weeks ago, but nobody answered me :(..I hope I will have more luck now Regards ---------- Forwarded message ---------- From: Aleksandra Cerekovic <ale...@gm...> Date: Apr 15, 2006 3:14 PM Subject: two questions To: cor...@li... Hello, I have two questions concerning CoreLibrary. I am looking forward the answer, if someone knows, I would be grateful. 1. There is server on localhost that accepts connections on port 10000 run. I want to create client that will connect to this port and send Message using NetworkConnection class. I have following lines: NetworkConnection* con =3D new NetworkConnection("localhost", 10000, new NetMessageProtocol(), NULL); if (!con->isConnected()){ printf("Connection is not connected\n"); return false; } Message* msg =3D new Message("from", "to", "Hey!"); Message* returnMsg =3D con->sendReceiveObject(msg, 1500); printf("Main received message:\n %s\n\n", (char *)returnMsg->print()); delete(returnMsg); Why server accepts Message only if I connect my computer to network (LAN or modem connection)? As server is run on localhost, there is no need to do it. Is there any solution for this? 2. There are two classes, class A and class B, declared in different headers (A.h and B.h). These headers include same headers from CoreLibrary (i.e. JString.h, JTime.h ). When I declare another class, class C in header C.h that includes both A.h and B.h I got errors in VC98 folder: c:\program files\microsoft visual studio\vc98\include\new(35) : error C2059: syntax error : 'constant' c:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function c:\program files\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters c:\program files\microsoft visual studio\vc98\include\new(36) : error C2059: syntax error : 'constant' c:\program files\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function=85=85=85=85. How I can avoid this errors? Do I have to change some properties in Project workspace? (in also tried to make project using same properties as your TestProject, but I got same mistakes) Regards, Sashka |
From: Aleksandra C. <ale...@gm...> - 2006-04-15 13:14:11
|
Hello, I have two questions concerning CoreLibrary. I am looking forward the answer, if someone knows, I would be grateful. 1. There is server on localhost that accepts connections on port 10000 run. I want to create client that will connect to this port and send Message using NetworkConnection class. I have following lines: NetworkConnection* con =3D new NetworkConnection("localhost", 10000, new NetMessageProtocol(), NULL); if (!con->isConnected()){ printf("Connection is not connected\n"); return false; } Message* msg =3D new Message("from", "to", "Hey!"); Message* returnMsg =3D con->sendReceiveObject(msg, 1500); printf("Main received message:\n %s\n\n", (char *)returnMsg->print()); delete(returnMsg); Why server accepts Message only if I connect my computer to network (LAN or modem connection)? As server is run on localhost, there is no need to do it. Is there any solution for this? 2. There are two classes, class A and class B, declared in different headers (A.h and B.h). These headers include same headers from CoreLibrary (l.e. JString.h, JTime.h ). When I declare another class, class C in header C.h that includes both A.h and B.h I got errors in VC98 folder: c:\program files\microsoft visual studio\vc98\include\new(35) : error C2059: syntax error : 'constant' c:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function c:\program files\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters c:\program files\microsoft visual studio\vc98\include\new(36) : error C2059: syntax error : 'constant' c:\program files\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function=85=85=85=85. How I can avoid this errors? Do I have to change some properties in Project workspace? (in also tried to make project using same properties as your TestProject, but I got same mistakes) Regards, Sashka |