Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24385] Windows: Ti.Network.Socket.TCP.readAsync() is not continuous

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2017-02-10T16:05:37.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.1.0
ComponentsWindows
Labelsn/a
ReporterGary Mathews
AssigneeGary Mathews
Created2017-02-08T12:13:28.000+0000
Updated2017-02-13T23:57:11.000+0000

Description

- When using Titanium.Stream.pump() - Titanium.Network.Socket.TCP.readAsync() does not stream data continuously to the callback. Only the first response is received. - When a connection is terminated the error is not handled elegantly, causing the application to crash. NOTE: The error parameters in the callbacks for both read and write should be updated accordingly.

Comments

  1. Gary Mathews 2017-02-08

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/947
  2. Samir Mohammed 2017-02-13

    Verified fixed, was able to receive multiple responses and when I run the application when no server is running the application no longer crashes. Log output from the application in studio
       -- Start application log -----------------------------------------------------
       [INFO] :   Finished launching the application
       [INFO] :   connecting...
       [INFO] :   connected to server
       [INFO] :   sending data...
       [INFO] :   sent
       [INFO] :   recv: test
       [INFO] :   sending data...
       [INFO] :   sent
       [INFO] :   recv: test
       [INFO] :   sending data...
       [INFO] :   sent
       [INFO] :   recv: test
       [INFO] :   sending data...
       [INFO] :   sent
       [INFO] :   recv: test
       
    Logout output from the server running in cmd using node index.js
       PS C:\Users\Tester> cd desktop
       PS C:\Users\Tester\desktop> node index.js
       server listening on port 6262
       client ::ffff:127.0.0.1 connected
       recv: test
       recv: test
       recv: test
       recv: test
       recv: test
       recv: test
       
    *Environment*
       Phone : Lumia 640 LTE (RM-1073)
       Operating System:
       Name                        = Microsoft Windows 10 Pro
       Version                     = 10.0.14393
       Architecture                = 32bit
       

    CPUs = 4

    Memory = 17034395648 Node.js: Node.js Version = 4.6.0 npm Version = 2.15.9 Titanium SDK: SDK Version = 6.1.0.v20170213134957

JSON Source