Discussion:
[dart-misc] How to send data to socket and receive data back in Aqueduct?
Niyazi Toros
2018-06-30 06:23:00 UTC
Permalink
I have socket services in my close network thats provide a database
communication in clear text. Example:

**Send to Socket:**

'Q101:_:49785:_:x\r\n'


Receive from Socket:

'1:_:2:_:119351:_:NÄ°YAZÄ° TOROS'


Now I am building Aqueduct Web Api so, I can connect over internet to send
and receive data back. Using Aqueduct and dart:io how to send above data to
Aqueduct web api, connect to socket services (in open mode, till user
finishes the work and close the socket) request data and receive data back?


Main problem is that I can only set timer (which I don't know how) say
every 5 minutes drop the connection so user can login again. Also once user
login they get a token and use this token in every other request until
connection close.


Second problem is that in 5 minutes when new request comes I have to
restart to timer. Unless no user interaction after 5 minutes user must
login again. In UI part I can redirect to new login but I need to set the
timer in aqueduct. Any help please?
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/13814aea-9fed-48c1-8134-117963708c21%40dartlang.org.
Loading...