View Issue Details

IDProjectCategoryView StatusLast Update
0000011Ecere SDKecerepublic2012-03-29 07:53
Reporteripluss Assigned Tojerome  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0000011: recvfrom is not used for UDP socket because DatagramHost sets _connected to 1
DescriptionProbably in fixing a memory leak, the following piece of code was added to
DatagramHost:

            disconnectCode = (DisconnectCode)-1;
            _connected = 1;

The use of _connected should be reviewed for UDP sockets.
TagsNo tags attached.

Relationships

child of 0000433 closed previously resolved issues (draft 1 of 0.44 and earlier) 

Activities

ipluss

2008-04-09 05:42

developer   ~0000007

because i can not understand that whole Socket file,
for fix a memory leak bug, so assign 1 to _connected
before we can know to resolve this question ,
the simplest way to fix this bug is
change if(type == tcp )|| _connected)
to if(type == tcp )//|| _connected)

:P

jerome

2008-05-13 20:02

administrator   ~0000043

- ipluss, your suggestion of always calling recvfrom for UDP sockets might be better, as it seems multiple different clients could be sending through the same hosting UDP socket. This would also mean that the buffering code built in Socket would not work and that UDP sockets should always ensure to process all the bytes coming in (returning "count" from OnReceive).
- An "inetPort" property has been added, functioning much like the already existing "inetAddress" property. Both inetPort and inetAddress are now reset after each recvFrom. Set properties were not added however, these should rather be set for UDP sockets by calling DatagramConnect which sets these. To be verified.

Issue History

Date Modified Username Field Change
2008-04-08 15:26 jerome New Issue
2008-04-09 05:42 ipluss Note Added: 0000007
2008-04-30 20:03 jerome Status new => assigned
2008-04-30 20:03 jerome Assigned To => jerome
2008-05-02 01:05 jerome Priority normal => high
2008-05-13 20:02 jerome Note Added: 0000043
2008-05-13 20:13 jerome Status assigned => resolved
2008-05-13 20:13 jerome Resolution open => fixed
2008-05-13 20:28 jerome Reporter jerome => ipluss
2009-05-03 03:43 jerome Status resolved => closed
2010-07-25 21:58 redj Relationship added child of 0000433
2012-03-29 07:53 redj Category => Ecere Runtime Library
2012-03-29 07:53 redj Project @1@ => Ecere SDK