Commit graph

57 commits

Author SHA1 Message Date
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Endre Sándor Varga
487083a9c3 +act #3586 #3807 Implement mandatory read throttling 2014-01-17 18:27:56 +01:00
Björn Antonsson
003609c9c5 =pro #3759 Changed to using non-deprecated ScalaTest Matchers 2013-12-18 11:32:51 +01:00
Johannes Rudolph
3da7f4ee07 =act #3680 fix SuspendReading being overruled by racy ChannelReadable 2013-10-21 15:33:31 +02:00
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
Björn Antonsson
f6179da523 Merge pull request #1729 from jrudolph/wip-3602-fix-connected
=act #3602 report `Connected` only when connection attempt was successful
2013-10-16 03:54:38 -07:00
Mathias
bb1b22bffd =act #3645 Make TcpOutgoingConnection actor handle UnresolvedAddressExceptions 2013-10-08 16:09:13 +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
Johannes Rudolph
1a67e937c7 =act #3602 report Connected only when connection attempt was successful
Before this change, a client connection was always instantly reported as
`Connected`, even if the endpoint would never respond at all.

The reason is a weird behavior of OP_CONNECT and SocketChannel in the
JDK (observed in Linux):
 - a channel is always connectable before the connection is attempted
   (`channel.connect`). Selecting for OP_CONNECT before the `connect`
   call will instantly report connectable
 - even worse: after OP_CONNECT was reported true, also `finishConnect`
   will always return true, even if the connection wasn't yet established.
   That's probably the case because `finishConnect` is internally implemented
   depending on previous epoll results (on Linux).
2013-09-12 11:31:06 +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
Roland Kuhn
8df8541801 Merge pull request #1500 from akka/wip-3210-local-only-∂π
make LocalScope mean “purely local” and avoid Props serialization check,...
2013-05-30 08:03:32 -07:00
Roland
92db59183e make LocalScope mean “purely local” and avoid Props serialization check, see #3210 2013-05-29 23:36:39 +02:00
Viktor Klang
15039a846f #3335 - Adding connection timeout to TCP connections 2013-05-28 15:21:02 +02:00
Roland
ea5b79e562 add BackpressureBuffer, see #3253
- also make a Write’s “ack” be a Tcp.Event (to suit pipelines)
- add stress test for BackpressureBuffer
- add it to SslTlsSupportSpec
- add it to the docs
2013-05-26 10:58:55 +02:00
Roland
025a91ecc2 fix some warts in IO
- remove TcpPipelineHandler’s type parameter
- remove not-accept() failure test (which is completely bogus)
- add comments explaining more about TcpPipelineHandler.Init
- remove the funny “manager” from the Server example
2013-05-23 16:14:51 +02:00
Viktor Klang
76df8e60d5 #3371 - using a new port for each of the TcpConnectionSpec tests to avoid races with reuse of port numbers 2013-05-20 15:05:44 +02:00
Mathias
0e0a95ff95 io: remove SelectionKey lookup and reduce IO-layer-internal message volume 2013-05-13 14:14:49 +02:00
Mathias
8070d4cfd3 io-tests: simplify TcpConnectionSpec in preparation for coming modifications
This doesn't change any test logic, it merely structures the test fixture code a bit differently to make it easier to insert additional mocks required for coming additions.
2013-05-13 14:14:49 +02:00
Viktor Klang
01a013e1c7 #3205 - Fixing a race condition in TcpConnectionSpec 2013-04-26 14:51:37 -07: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
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
Roland
6a4be23d58 include bound localAddress in Bound message, see #3230
- done for Tcp & Udp in the same way
- also try to fix TcpConnectionSpec on my Mac
2013-04-15 11:58: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
e532a77824 Tcp: hide support for half-closed connections behind Register.keepOpenOnPeerClosed 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
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
Viktor Klang
6976317bc7 Merged with master 2013-04-03 16:21:22 +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
Björn Antonsson
a4ab7a9841 Cleaning up the ActorRef serialization according to review. See #3137 2013-04-03 10:49:38 +02:00
Viktor Klang
c883705242 #3018 - Enabling -Xlint and dealing with the situation that occurs 2013-03-29 01:43:17 +01:00
Björn Antonsson
e18281803e Read instead of write to get connection reset by peer. See #3128 2013-03-20 11:21:09 +01:00
Endre Sándor Varga
cbe582454c Fixed TcpConnetionSpec to be l10n aware #3089 2013-03-04 14:35:00 +01:00
Endre Sándor Varga
f8d178502e Fixed race between async close() and ChannelReadable message in tests #3055 2013-03-01 16:21:27 +01:00
Viktor Klang (√)
b92d0a42ca Merge pull request #1204 from akka/wip-3093-removing-temporal-constraints-√
#3093 - removing the temporal constraints on TcpConnectionSpec
2013-02-26 02:02:54 -08:00
drewhk
f8237d1c67 Merge pull request #1198 from drewhk/wip-3064-nonblocking-tcp-tests-drewhk
Removed blocking code from TcpConnectionSpec #3064
2013-02-26 01:55:52 -08:00
Endre Sándor Varga
6321663471 Merge branch '1182'
Conflicts:
	akka-actor-tests/src/test/scala/akka/io/TcpConnectionSpec.scala
2013-02-25 16:37:04 +01:00
Viktor Klang
aa16bfaa66 #3093 - removing the temporal constraints on TcpConnectionSpec 2013-02-25 15:44:38 +01:00
Endre Sándor Varga
185771c91d Removed blocking code from TcpConnectionSpec #3064 2013-02-25 13:50:11 +01:00
drewhk
00b16997f2 Merge pull request #1183 from drewhk/wip-disable-l10n-sensitive-io-tests-drewhk
Temporary fix to make build happy again.
2013-02-22 05:08:00 -08:00
Endre Sándor Varga
050a7f1e6c Temporary fix to make build happy again. 2013-02-22 13:31:23 +01:00
Mathias
fd3f69c762 Fix typos in TcpConnectionSpec 2013-02-22 12:20:47 +01:00
Patrik Nordwall
2a45d99ab3 Change more copyright to 2009-2013, see #2879
* Also added some missing headers
2013-02-20 21:26:52 +01:00
Endre Sándor Varga
e9da097621 Fixed according to revew comments 2013-02-10 13:52:52 +01:00