![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section contents
csocket.oxh
<TBS>
this& = NewNetDatabase&:
Creates a net database object and returns a handle to the created object.
this& |
A handle which represents the created net database object |
If the object could not be created then an error is generated
which should be trapped by an ONERR
handler.
LOCAL this& this& = NewNetDatabase&: DeleteNetDatabase:(this&)
DeleteNetDatabase:(BYREF this&)
Destroys the net database object.
BYREF this& |
A handle for a net database object. A zero value is written back into the variable |
LOCAL this& this& = NewNetDatabase&: DeleteNetDatabase:(this&)
NetDatabaseAddA:(this&,item&,BYREF status&)
<TBS>
this& |
A handle for a net database object |
item& |
A handle to the item to add to the database |
BYREF status& |
The status of the asynchronous operation. |
LOCAL this&,entry&,status& this& = NewNetDatabase&: entry& = NewIASDatabaseEntry&: IASDatabaseEntrySetClassName:(entry&,"IrDA:IrCOMM") IASDatabaseEntrySetAttributeName:(entry&,"IrDA:TinyTP:LsapSel") IASDatabaseEntrySetToInteger:(entry&,4) NetDatabaseAddA(this&,entry&,status&) IOWAITSTAT32 status& NetDatabaseClose:(this&) DeleteIASDatabaseEntry:(entry&) DeleteNetDatabase:(this&)
NetDatabaseCancel:(this&)
Cancels any outstanding operation.
this& |
A handle for a net database object |
NetDatabaseClose:(this&)
Closes a connection to the net database service.
this& |
A handle for a net database object |
LOCAL this&,entry&,status& this& = NewNetDatabase&: entry& = NewIASDatabaseEntry&: IASDatabaseEntrySetClassName:(entry&,"IrDA:IrCOMM") IASDatabaseEntrySetAttributeName:(entry&,"IrDA:TinyTP:LsapSel") IASDatabaseEntrySetToInteger:(entry&,4) NetDatabaseAddA(this&,entry&,status&) IOWAITSTAT32 status& NetDatabaseClose:(this&) DeleteIASDatabaseEntry:(entry&) DeleteNetDatabase:(this&)
err% = NetDatabaseOpen%:(this&,server&,family&,protocol&)
Opens a connection to the net database service.
this& |
A handle for a net database object |
server& |
The socket server session; a handle to a SocketServ object |
family& |
Specifies the address family |
protocol& |
Specifies the protocol |
err% |
The result of the operation |
NetDatabaseQueryA:(this&,query&,response&,BYREF
status&)
<TBS>
this& |
A handle for a net database object |
query& |
A handle to a query object |
response& |
A handle to a response object |
BYREF status& |
The status of the asynchronous operation. |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
The following code assumes that remAddr&
contains a handle to a remote connection.
LOCAL this&,query&,response&,status&,timChan%,timStat%,signals%,result% this& = NewNetDatabase&: entry& = NewIASDatabaseEntry&: IASDatabaseEntrySetClassName:(entry&,"IrDA:IrCOMM") IASDatabaseEntrySetAttributeName:(entry&,"IrDA:TinyTP:LsapSel") IASDatabaseEntrySetToInteger:(entry&,4) result% = IOOPEN(timChan%,"TIM:",0) IF result%<0 RAISE result% ENDIF IOC(timChan%,1,timStat%,50) query& = NewIASQuery&:("IrDA:IrCOMM","IrDA::TinyTP:LsapSel",remAddr&); response& = NEWIASResponse&: NetDatabaseQueryA:(database&,query&,response&,status&) signals%=0 WHILE 1 IOWAIT IF status& <> KStatusPending32& IOCANCEL(timChan%) IOWAITSTAT timStat% BREAK ELSEIF timStat% <> KErrFilePending% NetDatabaseCancel:(database&) IOWAITSTAT32 status& PRINT "NetDatabaseQueryA: timed out" BREAK ELSE signals% = signals%+1 ENDIF ENDWH WHILE signals%>0 IOSIGNAL signals% = signals%-1 ENDWH DeleteIASResponse:(response&) DeleteIASQuery:(query&) DeleteNetDatabase:(this&)
NetDatabaseRemoveA:(this&,item&,BYREF status&)
<TBS>
this& |
A handle for a net database object |
item& |
A handle to the object to remove from the database |
BYREF status& |
The status of the asynchronous operation. |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |