Commit graph

1866 commits

Author SHA1 Message Date
Andrew McCallum
4dce3fd8d6 Debugging messages conditioned on debug_run_loop.
([RunLoop -runOnceBeforeDate:forMode:]): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1120 72102866-910b-0410-8b05-ffd578937521
1996-03-12 19:42:45 +00:00
Andrew McCallum
6050415646 ([Port +outPacketClass]): Method renamed from packetClass.
([Port -outPacketClass]): Likewise.
([InPort -setReceivedPacketInvocation:]): Method renamed from
setPacketInvocation.
([OutPort -sendPacket:]): Method renamed from -sendPacket:withTimeout:.
(OutPacket, InPacket): New classes, replacing Packet class.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1119 72102866-910b-0410-8b05-ffd578937521
1996-03-12 19:42:10 +00:00
Andrew McCallum
7410f0818d ([MemoryStream -initWithCapacity:prefix:]): New method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1118 72102866-910b-0410-8b05-ffd578937521
1996-03-12 19:40:30 +00:00
Andrew McCallum
cce7a64779 Remove old-style methods for getting incoming ConnectedCoders. Add
new methods that use RunLoop.  All callers changed.
([Connection -addToRunLoop:forMode:]): New method.
([Connection -removeFromRunLoop:forMode:]): New method.
([Connection -runConnectionUntilDate:]): New method.
([Connection -runConnection]): Method changed to call above method.
([Connection -_handleRmc:]): New method.
([Connection -_handleQueuedRmcRequests]): New method.
([Connection -_getReceivedReplyRmcFromQueueWithSequenceNumber:]): New
method.
([Connection -_getReceivedReplyRmcWithSequenceNumber:]): New method.
([Connection -invokeWithObject:]): New method.
([Connection +newForInPort:outPort:ancestorConnection:]): Set
reply_depth ivar.
([Connection -_encoderCreateReferenceForConstPtr:]): Return the xref!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1117 72102866-910b-0410-8b05-ffd578937521
1996-03-12 19:40:16 +00:00
Andrew McCallum
17093e1111 ([ConnectedDecoder +newDecodingWithPacket:connection:]): New method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1116 72102866-910b-0410-8b05-ffd578937521
1996-03-12 19:36:13 +00:00
Andrew McCallum
5f0b7b4d69 Updated for new RunLoop.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1115 72102866-910b-0410-8b05-ffd578937521
1996-03-12 19:20:07 +00:00
Andrew McCallum
3417862743 *** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1114 72102866-910b-0410-8b05-ffd578937521
1996-03-12 15:39:13 +00:00
Andrew McCallum
a2f89eeb5a (TcpInPort _run_loop, _run_loop_mode): New ivars.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1113 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:57:08 +00:00
Andrew McCallum
ca33981cce Declare new methods.
(Port _packet_invocation): New ivar.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1112 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:56:43 +00:00
Andrew McCallum
0347b4349f ([NotificationDispatcher +defaultInstance): Declare new method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1111 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:55:49 +00:00
Andrew McCallum
4275c2c40d (Notifying): New protocol.
(NotificationPosting): New protocol.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1110 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:55:22 +00:00
Andrew McCallum
8e71e638a8 Declare new method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1109 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:54:34 +00:00
Andrew McCallum
ab0cc7c2ac (ConstantArray): Inherit from ConstantIndexedCollection, not
IndexedCollection.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1108 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:54:25 +00:00
Andrew McCallum
499c00bb34 ([TcpInPort -receivePacketWithTimeout:]): Completely new
implementation that uses the RunLoop.
([TcpInPort -old_receivePacketWithTimeout:]): New method, holding old
implementation.
([TcpInPort -invokeWithObject:]): New method, called by RunLoop.
([TcpInPort -_tryToGetPacketFromReadableFD:]): New private method.
([TcpInPort -_addClientOutPort:toRunLoop:forMode:]): New method.
([TcpInPort -addToRunLoop:forMode:]): New method.
([TcpInPort -_removeClientOutPort:fromRunLoop:forMode:]): New method.
([TcpInPort -removeFromRunLoop:forMode:]): New method.
([TcpInPort -_addClientOutPort:]): Add it to the RunLoop.
([TcpInPort -_connectedOutPortInvalidated:]): Remove it from the
RunLoop.
([TcpInPort -_addClientOutPort:]): Method renamed from _addOutPort:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1107 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:53:45 +00:00
Andrew McCallum
c7560c1d06 ([InPort -init]): Set _packet_invocation.
([InPort -setPacketInvocation:]): New method.
([InPort -addToRunLoop:forMode:]): New method.
([InPort -removeFromRunLoop:forMode:]): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1106 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:50:46 +00:00
Andrew McCallum
1400e225cd ([NotificationDispatcher +defaultInstance]): New method.
([NotificationDispatcher -removeObserver:name:object:]): Remove
handling of non-existance _nil_observer_array.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1105 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:49:02 +00:00
Andrew McCallum
7e9fbfc9ac Many small formatting changes.
(UNIX_REFERENCE_INTERVAL): Macro renamed from UNIX_OFFSET.
([NSConcreteDate -timeIntervalSinceNow]): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1104 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:48:07 +00:00
Andrew McCallum
01e6c781ee (CFLAGS): Add -Wall.
(GNU_MFILES): Add RunLoop.m.
(GNU_HEADERS): Add objects/RunLoop.h.
(GNUSTEP_MFILES): Add NSTimer.m.
(GNUSTEP_HEADERS): Add Foundation/NSTimer.h.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1103 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:46:20 +00:00
Andrew McCallum
88bd7036a3 (return_retained): Change macro from 1 to 0.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1102 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:44:47 +00:00
Andrew McCallum
e857abdc62 Declare NSTimer class interface.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1101 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:44:22 +00:00
Andrew McCallum
6258794c83 Formatting change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1100 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:43:55 +00:00
Andrew McCallum
8878d34fc3 ([Connection -isValid]): New method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1099 72102866-910b-0410-8b05-ffd578937521
1996-03-12 14:43:30 +00:00
Andrew McCallum
6eb2c1dadd Changes by Scott Christley.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1098 72102866-910b-0410-8b05-ffd578937521
1996-03-11 20:25:36 +00:00
Andrew McCallum
642a35cd83 New file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1097 72102866-910b-0410-8b05-ffd578937521
1996-03-11 20:22:20 +00:00
Andrew McCallum
ec380ef78f ([IndexedCollection +initialize]): Compare self with
IndexedCollection, not KeyedCollection.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1096 72102866-910b-0410-8b05-ffd578937521
1996-03-11 17:02:02 +00:00
Andrew McCallum
e31ac21a93 ([TcpInPort -receivePacketWithTimeout:]): Move initialization of
select_timeout to inside loop since Linux select() modifies
*select_timeout.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1095 72102866-910b-0410-8b05-ffd578937521
1996-03-07 20:51:50 +00:00
Andrew McCallum
6c6372b7f1 (main): Use new notification interface.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1094 72102866-910b-0410-8b05-ffd578937521
1996-03-07 18:15:50 +00:00
Andrew McCallum
88ce6294af (announce_new_port): New function.
(announce_broken_port): New function.
(main): Register them for notifications; let user choose registered
name on command line.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1093 72102866-910b-0410-8b05-ffd578937521
1996-03-07 18:15:25 +00:00
Andrew McCallum
148267ae25 Fix typo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1092 72102866-910b-0410-8b05-ffd578937521
1996-03-07 18:14:41 +00:00
Andrew McCallum
e90175e3b3 Assert is_valid in many places.
([TcpInPort +newForReceivingFromPortNumber:]): Get the address of the
host, not localhost=127.0.0.1.
([TcpInPort -invalidate]): Remove ourselves from socket_2_port and
port_number_2_port here instead of in -dealloc.
([TcpInPort -description]): Indicate whether we are valid or not in
string.
([TcpOutPort -description]): Likewise.
([TcpOutPort -invalidate]): Assert is_valid, don't just conditionally
execute body.  Remove ourselves from out_port_bag and socket_2_port
here, not in -dealloc.
([TcpPacket +_getPacketSize:andReplyPort:fromSocket:inPort:]): If we
don't read() full prefix, don't abort(), just return EOF.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1091 72102866-910b-0410-8b05-ffd578937521
1996-03-07 18:14:23 +00:00
Andrew McCallum
090baa7b50 Assert that the connection is valid in several places.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1090 72102866-910b-0410-8b05-ffd578937521
1996-03-07 18:09:06 +00:00
Andrew McCallum
1d5160b3ca Assert is_valid in many places.
([Connection +newForInPort:outPort:ancestorConnection:]): Set is_valid
to 1.  Only ask for notification of out port death if out port is non-nil.
([Connection -portIsInvalid:]): Properly get the port from the
notification object.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1089 72102866-910b-0410-8b05-ffd578937521
1996-03-07 18:08:24 +00:00
Andrew McCallum
f8753a41c1 ([Port -invalidate]): Insist that is_valid is true at the beginning of
this method, don't test it and skip the body of this method.  Force
users to be careful about calling -invalidate more than once.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1088 72102866-910b-0410-8b05-ffd578937521
1996-03-07 02:30:04 +00:00
Andrew McCallum
32a702571f (NSAllMapTableValues): Get rid of unused variable ARRAY. Return
VALUEARRAY, not unused variable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1087 72102866-910b-0410-8b05-ffd578937521
1996-03-07 01:56:10 +00:00
Andrew McCallum
dde3532e32 (main): Wrap it with an NSAutoreleasePool.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1086 72102866-910b-0410-8b05-ffd578937521
1996-03-07 00:39:51 +00:00
Andrew McCallum
1b6a1efebb Update for new server interface.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1085 72102866-910b-0410-8b05-ffd578937521
1996-03-07 00:39:28 +00:00
Andrew McCallum
64d8da5a82 (main): Use new notification interface for invocations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1084 72102866-910b-0410-8b05-ffd578937521
1996-03-07 00:36:15 +00:00
Andrew McCallum
8e27da11da Declare new methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1083 72102866-910b-0410-8b05-ffd578937521
1996-03-07 00:29:05 +00:00
Andrew McCallum
b0645f6d52 (NotificationRequest): Ivar names prepended with `_'.
(NotificationInvocation): Likewise.
(NotificationPerformer): Likewise.
([NotificationDispatcher
-_addObserver:notificationRequest:name:object:]): Insist that observer
be non-nil; (in the case of Invocation's, the invocation is now the
observer).
([NotificationDispatcher -addInvocation:name:object:]): Method renamed
from -addObserver:invocation:...  Pass the invocation as the
observer.  Release the NR after it has been added.
([NotificationDispatcher -addObserver:selector:name:object:]): Release
the NR after it has been added.
([NotificationDispatcher -_removeFromLinkedListNotificationRequest:]):
New method.
([NotificationDispatcher -removeInvocation:]): New method.
([NotificationDispatcher -removeInvocation:name:object:]): New method.
([NotificationDispatcher -removeObserver:]): Use
_removeFromLinkedListNotificationRequest:.
([NotificationDispatcher -removeObserver:name:object:]): Likewise.
([NotificationDispatcher +addInvocation:name:object:]): New method.
([NotificationDispatcher +removeInvocation:]): New method.
([NotificationDispatcher +removeInvocation:name:object:]): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1082 72102866-910b-0410-8b05-ffd578937521
1996-03-07 00:28:43 +00:00
Andrew McCallum
489b5a0805 ([Connection +initialize]): Initialize all_connections_local_targets.
([Connection -addLocalObject:]): Put it in all_connections_local_targets
also.
([Connection -removeLocalObject:]): Remove it from
all_connections_local_targets also.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1081 72102866-910b-0410-8b05-ffd578937521
1996-03-06 16:40:00 +00:00
Andrew McCallum
e432090578 Send -close to Archiver, not old -closeCoder.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1080 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:49:39 +00:00
Andrew McCallum
a3a7a895f7 Use notifications instead of old scheme for invalidation listening.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1079 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:48:59 +00:00
Andrew McCallum
4287219162 Don't conform to no-longer-used InvalidationListening protocol.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1078 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:48:18 +00:00
Andrew McCallum
a601567d41 (announce_new_connection): New function.
(main): Register it for notifications.  Run the connection forever,
instead of on a 15 second timeout.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1077 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:47:46 +00:00
Andrew McCallum
961ca24740 (main): Before exit, invalidate the connection, not the proxy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1076 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:46:39 +00:00
Andrew McCallum
6c665a7b9c (first): Force check for re-compilation of libobjects.
(second): Likewise.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1075 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:46:05 +00:00
Andrew McCallum
e8509b14c5 (TEXI_FILES): Add gnustep-faq.texi.
(GNUstep-FAQ): New target.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1074 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:45:35 +00:00
Andrew McCallum
ed8cc76c38 (announce_new_connection): New function.
(announce_broken_connection): New function.
(main): Register new functions for notifications.  Send messages back
to clients to test reply port mechanism.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1073 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:45:09 +00:00
Andrew McCallum
fa6177e350 Test the reply port mechanism; look for messages coming back from the
server.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1072 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:44:21 +00:00
Andrew McCallum
4cdae9b191 Use Array instead of List. Use NotificationDispatcher to hear about
invalid and new connections.  Let the user set the registerd name from
the command line.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1071 72102866-910b-0410-8b05-ffd578937521
1996-03-06 14:43:46 +00:00