Commit graph

41 commits

Author SHA1 Message Date
Johannes Rudolph
f87f166aac =act #3672 fix garbling of big outgoing Tcp.Write caused by mixup of buffers 2013-10-17 14:25:02 +02:00
Mathias
85c771d731 !act #3581 Add Tcp.CompoundWrite, some cleanup
Moves `def ack: Event` and `def wantsAck: Boolean` from the `Tcp.WriteCommand` type down to the newly introduced `Tcp.CompactWriteCommand`, which breaks existing code depending on these.
Additionally `Tcp.WriteCommand` now has a few additional methods (`+:`, `++:`, prepend) and a companion object.
2013-09-26 12:19:28 +02:00
Endre Sándor Varga
b566e9393d =act, rem, clu #3521: make serialize-messages work with core modules 2013-08-27 11:05:54 +02:00
Roland Kuhn
b044b6b5a9 Merge pull request #1548 from spray/wip/io-fix-configured-noacks
io: fix rare bug in TcpConnection causing the sending of certain `NoAck`...
2013-06-20 04:57:10 -07:00
Mathias
b311e9e700 io: change IOException treatment from "fatal error" to "expected during normal operation"
Up to now IOExceptions during reading, writing or connecting were treated as
fatal actor errors, crashing the connection actor and thus producing ERROR
level log messages. This patch treats such exceptions as "expected" during
normal operation and prevents them from crashing the actor. Rather, they are
logged at DEBUG level and the actor is actively and cleanly stopped.
2013-06-20 10:22:47 +02:00
Mathias
f2ab463c4d io: fix TcpConnection acking empty writes which carry NoAck(...) markers 2013-06-20 10:11:10 +02:00
Patrik Nordwall
9b59187816 tone down error logging in IO layer, see #3386
* Made defaultDecider available in SupervisorStrategy,
  turned out that I didn't need it but I think it could be
  good anyway, e.g.
  override def supervisorStrategy = OneForOneStrategy(
    enableLogging = false)(SupervisorStrategy.defaultDecider)
* Verified the following scenarios:
  - client connection failure
  - server bind failure
  - kill client (peer closed)
  - kill server (peer closed)
2013-05-31 14:32:08 +02:00
Mathias
0e0a95ff95 io: remove SelectionKey lookup and reduce IO-layer-internal message volume 2013-05-13 14:14:49 +02:00
Björn Antonsson
539df2e98a Enforce mailbox types on System actors. See #3273 2013-05-03 11:05:32 +02:00
Roland
0e34edbcb3 implement ResumeWriting, see #3200
also included:
- a complete rewrite of the TCP docs based on real/tested/working code
  samples
- an EchoServer implementation which handles all the edge cases,
  available in Java & Scala
- renamed StopReading to SuspendReading to match up with ResumeReading
- addition of Inbox.watch()
- Inbox RST docs for Java(!) and Scala

not included:
- ScalaDoc / JavaDoc for all IO stuff
2013-04-18 15:05:48 +02:00
Patrik Nordwall
9e56ab6fe5 Disallow re-joining, see #2873
* Disallow join requests when already part of a cluster
* Remove wipe state when joining, since join can only be
  performed from empty state
* When trying to join, only accept gossip from that member
* Ignore gossips from unknown (and unreachable) members
* Make sure received gossip contains selfAddress
* Test join of fresh node with same host:port
* Remove JoinTwoClustersSpec
* Welcome message as reply to Join
* Retry unsucessful join request
* AddressUidExtension
* Uid in cluster Member identifier
  To be able to distinguish nodes with same host:port
  after restart.
* Ignore gossip with wrong uid
* Renamed Remove command to Shutdown
* Use uid in vclock identifier
* Update sample, Member apply is private
* Disabled config duration syntax and cleanup of io settings
* Update documentation
2013-04-17 16:48:18 +02:00
Roland Kuhn
cdf717e855 Merge pull request #1321 from spray/wip-IO-WriteFile-rebased
Tcp: introduce WriteFile to support zero-copy writing of files, fixes #2896
2013-04-17 04:39:41 -07:00
Johannes Rudolph
c342edee48 TcpConnection: forward exception from WriteFile dispatcher to the actor for proper handling 2013-04-15 15:03:02 +02:00
Johannes Rudolph
bc52e27af5 TcpConnection: don't lose direct buffers when ByteString operations fail 2013-04-15 14:54:46 +02:00
Johannes Rudolph
bfe4ce8219 TcpConnection: add file-io-transferTo-limit config parameter 2013-04-15 14:53:41 +02:00
Mathias
ec13033e5e Fix Connectable channel failed to connect assertion error on OS/X 2013-04-11 14:34:50 +02:00
Mathias
913ed46c1a Tone down error logging of DeathPactExceptions via dedicated SupervisorStrategy 2013-04-11 14:34:50 +02:00
Johannes Rudolph
c5d90a1c57 Tcp: cosmetic changes and more checks
* whitespace
 * Write.Empty => Write.empty
 * check requirements
 * better 0-checks
2013-04-10 14:56:51 +02:00
Johannes Rudolph
15545641a6 Tcp: introduce WriteFile to support zero-copy writing of files (using FileChannel.transferTo), fixes #2896 2013-04-09 14:33:10 +02:00
Johannes Rudolph
54d91c180a Tcp: abstract writing into WriteCommand to make place for other kinds of writing 2013-04-09 14:29:29 +02:00
Johannes Rudolph
7d152c9ec2 TcpConnection: abstract PendingWrite logic to make room for other types of writing 2013-04-09 14:26:02 +02:00
Johannes Rudolph
e532a77824 Tcp: hide support for half-closed connections behind Register.keepOpenOnPeerClosed 2013-04-09 11:24:55 +02:00
Johannes Rudolph
fd05cad103 TcpConnection: use pattern matching 2013-04-09 11:24:55 +02:00
Johannes Rudolph
1b95f65cf4 io: handle half-closed connection when peer closed first
This allows to send data back to the peer even if the peer already has sent
EOF/FIN as specified for TCP. To fully close a connection, the handler has
to close its side of the connection now actively once it is finished with
writing even if it received a `PeerClosed` message before.
2013-04-09 11:24:55 +02:00
Roland Kuhn
7a8dbda95d Merge pull request #1294 from spray/tcp-connection-immediate-Received-message
TcpConnection: forward received data to handler immediately without concatenating buffers
2013-04-08 11:00:39 -07:00
Roland Kuhn
22968a3ab8 Merge pull request #1281 from spray/master
Smaller improvements to TCP side of new akka-io implementation
2013-04-04 02:47:35 -07:00
Mathias
c43ce95bd4 Small simplification in TcpConnection 2013-04-04 11:39:37 +02:00
Mathias
1790bc0e1a TcpOutgoingConnection: Respond with CommandFailed rather than ErrorClosed on failed connect
Before, a Tcp.ErrorClosed event is generated when a connection attempt fails. For symmetry with the Tcp.Bind case and general usability of the API a Tcp.CommandFailed(connect) is the better choice.
2013-04-04 11:39:37 +02:00
Mathias
854d0feef7 Make use of new command.failureMessage 2013-04-04 11:39:37 +02:00
Johannes Rudolph
fc6b7830a9 TcpConnection: forward received data to handler immediately without concatenating buffers
For these reasons:

 - pipeline effect will allow to start processing on the first part of the
   data immediately in parallel
 - data in `Received` messages is now always a simple ByteStrings which will
   improve iteration speed in the next layer
 - code becomes simpler
2013-04-03 16:10:49 +02:00
Viktor Klang
c883705242 #3018 - Enabling -Xlint and dealing with the situation that occurs 2013-03-29 01:43:17 +01:00
Endre Sándor Varga
852afeb565 Set TCPNODELAY as default. 2013-03-13 13:42:04 +01:00
Roland
80825d2433 fix TcpConnection’s PendingWrite.wantsAck 2013-02-15 14:29:37 +01:00
Roland
6d61a59a0f add INTERNAL API markers and explicit return types 2013-02-15 13:11:35 +01:00
Endre Sándor Varga
e9da097621 Fixed according to revew comments 2013-02-10 13:52:52 +01:00
Endre Sándor Varga
91d798cee1 Updated tests to work (or be disabled) on Win 2013-02-06 17:52:49 +01:00
Endre Sándor Varga
98a707bd57 Fixed temporarily disabled StopReading operation 2013-02-05 13:38:27 +01:00
Endre Sándor Varga
1ec065b0cd Factored out common manager code and SocketOptions 2013-02-05 11:48:47 +01:00
Endre Sándor Varga
946fb0eec4 Removed WithByteBuffer and friends 2013-02-04 16:24:34 +01:00
Endre Sándor Varga
8b4a3b0b92 Another LIMBO commit, but TCP now uses the unified selector 2013-02-01 13:11:17 +01:00
Roland
a964843843 move akka-io project into akka-actor’s akka.io package 2013-01-30 09:30:59 +01:00
Renamed from akka-io/src/main/scala/akka/io/TcpConnection.scala (Browse further)