User Tools

Site Tools


en:code:data:tcp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:code:data:tcp [2011/01/27 21:06]
jmgr
en:code:data:tcp [2020/02/09 13:26] (current)
Line 28: Line 28:
  onConnected:​ function()  onConnected:​ function()
  {  {
- Console.print("​Connected !");+ Console.print("​Connected!"​);​
  },  },
  onDisconnected:​ function()  onDisconnected:​ function()
  {  {
- Console.print("​Disconnected !");+ Console.print("​Disconnected!"​);​
  }  }
 }); });
Line 60: Line 60:
 === Notes === === Notes ===
 This method is asynchronous,​ this means that it will return before a connection is established. This method is asynchronous,​ this means that it will return before a connection is established.
-To known when a connection is made use the [[#​onConnected|onConnected]] event or the [[#​waitForConnected|waitForConnected]] method.+To know when a connection is made use the [[#​onConnected|onConnected]] event or the [[#​waitForConnected|waitForConnected]] method.
  
 ==== write ==== ==== write ====
Line 78: Line 78:
 === Notes === === Notes ===
 This method is asynchronous,​ this means that it will return before the data has been written. This method is asynchronous,​ this means that it will return before the data has been written.
-To known when the data has been sent use the [[#​onBytesWritten|onBytesWritten]] event or the [[#​waitForBytesWritten|waitForBytesWritten]] method.+To know when the data has been sent use the [[#​onBytesWritten|onBytesWritten]] event or the [[#​waitForBytesWritten|waitForBytesWritten]] method.
  
 ==== writeText ==== ==== writeText ====
Line 96: Line 96:
 === Notes === === Notes ===
 This method is asynchronous,​ this means that it will return before the data has been written. This method is asynchronous,​ this means that it will return before the data has been written.
-To known when the text has been sent use the [[#​onBytesWritten|onBytesWritten]] event or the [[#​waitForBytesWritten|waitForBytesWritten]] method.+To know when the text has been sent use the [[#​onBytesWritten|onBytesWritten]] event or the [[#​waitForBytesWritten|waitForBytesWritten]] method.
  
 ==== disconnect ==== ==== disconnect ====
Line 114: Line 114:
 === Notes === === Notes ===
 This method is asynchronous,​ this means that it will return before the connection is closed. This method is asynchronous,​ this means that it will return before the connection is closed.
-To known when the connection is closed use the [[#​onDisconnected|onDisconnected]] event or the [[#​waitForDisconnected|waitForDisconnected]] method.+To know when the connection is closed use the [[#​onDisconnected|onDisconnected]] event or the [[#​waitForDisconnected|waitForDisconnected]] method.
  
 ==== read ==== ==== read ====
Line 128: Line 128:
  
 === Notes === === Notes ===
-To known when data is available use the [[#​onReadyRead|onReadyRead]] event or the [[#​waitForReadyRead|waitForReadyRead]] method.+To know when data is available use the [[#​onReadyRead|onReadyRead]] event or the [[#​waitForReadyRead|waitForReadyRead]] method.
  
 ==== readText ==== ==== readText ====
Line 142: Line 142:
  
 === Arguments === === Arguments ===
-  - encoding - ([[code:​core:​global#​encoding|Encoding]]) the encoding to use+  - encoding - ([[en:code:​core:​global#​encoding|Encoding]]) the encoding to use
  
 === Returns === === Returns ===
Line 148: Line 148:
  
 === Notes === === Notes ===
-To known when text is available use the [[#​onReadyRead|onReadyRead]] event or the [[#​waitForReadyRead|waitForReadyRead]] method.+To know when text is available use the [[#​onReadyRead|onReadyRead]] event or the [[#​waitForReadyRead|waitForReadyRead]] method.
  
 ==== waitForConnected ==== ==== waitForConnected ====
Line 321: Line 321:
  
 ==== OpenMode ==== ==== OpenMode ====
-File open mode.+Open mode.
  
 === Values === === Values ===
Line 333: Line 333:
 Example: Example:
 <code javascript>​ <code javascript>​
-myObject.connect("​127.0.0.1",​ 80, File.ReadOnly | File.Unbuffered);​+myObject.connect("​127.0.0.1",​ 80, Tcp.ReadOnly | Tcp.Unbuffered);​
 </​code>​ </​code>​
en/code/data/tcp.1296162382.txt.gz ยท Last modified: 2020/02/09 13:26 (external edit)