|
| _i16 | sl_Socket (_i16 Domain, _i16 Type, _i16 Protocol) |
| | Create an endpoint for communication. More...
|
| |
| _i16 | sl_Close (_i16 sd) |
| | Gracefully close socket. More...
|
| |
| _i16 | sl_Accept (_i16 sd, SlSockAddr_t *addr, SlSocklen_t *addrlen) |
| | Accept a connection on a socket. More...
|
| |
| _i16 | sl_Bind (_i16 sd, const SlSockAddr_t *addr, _i16 addrlen) |
| | Assign a name to a socket. More...
|
| |
| _i16 | sl_Listen (_i16 sd, _i16 backlog) |
| | Listen for connections on a socket. More...
|
| |
| _i16 | sl_Connect (_i16 sd, const SlSockAddr_t *addr, _i16 addrlen) |
| | Initiate a connection on a socket. More...
|
| |
| _i16 | sl_Select (_i16 nfds, SlFdSet_t *readsds, SlFdSet_t *writesds, SlFdSet_t *exceptsds, struct SlTimeval_t *timeout) |
| | Monitor socket activity. More...
|
| |
| _i16 | sl_SetSockOpt (_i16 sd, _i16 level, _i16 optname, const void *optval, SlSocklen_t optlen) |
| | Set socket options-. More...
|
| |
| _i16 | sl_GetSockOpt (_i16 sd, _i16 level, _i16 optname, void *optval, SlSocklen_t *optlen) |
| | Get socket options. More...
|
| |
| _i16 | sl_Recv (_i16 sd, void *buf, _i16 len, _i16 flags) |
| | Read data from TCP socket. More...
|
| |
| _i16 | sl_RecvFrom (_i16 sd, void *buf, _i16 len, _i16 flags, SlSockAddr_t *from, SlSocklen_t *fromlen) |
| | Read data from socket. More...
|
| |
| _i16 | sl_Send (_i16 sd, const void *buf, _i16 len, _i16 flags) |
| | Write data to TCP socket. More...
|
| |
| _i16 | sl_SendTo (_i16 sd, const void *buf, _i16 len, _i16 flags, const SlSockAddr_t *to, SlSocklen_t tolen) |
| | Write data to socket. More...
|
| |
| _u32 | sl_Htonl (_u32 val) |
| | Reorder the bytes of a 32-bit unsigned value. More...
|
| |
| _u16 | sl_Htons (_u16 val) |
| | Reorder the bytes of a 16-bit unsigned value. More...
|
| |
Controls standard client/server sockets programming options and capabilities.
| _i16 sl_Accept |
( |
_i16 |
sd, |
|
|
SlSockAddr_t * |
addr, |
|
|
SlSocklen_t * |
addrlen |
|
) |
| |
Accept a connection on a socket.
This function is used with connection-based socket types (SOCK_STREAM).
It extracts the first connection request on the queue of pending connections, creates a new connected socket, and returns a new file descriptor referring to that socket.
The newly created socket is not in the listening state. The original socket sd is unaffected by this call.
The argument sd is a socket that has been created with sl_Socket(), bound to a local address with sl_Bind(), and is listening for connections after a sl_Listen(). The argument addr is a pointer to a sockaddr structure. This structure is filled in with the address of the peer socket, as known to the communications layer. The exact format of the address returned addr is determined by the socket's address family.
The addrlen argument is a value-result argument: it should initially contain the size of the structure pointed to by addr, on return it will contain the actual length (in bytes) of the address returned.
- Parameters
-
| [in] | sd | Socket descriptor (handle) |
| [out] | addr | The argument addr is a pointer to a sockaddr structure. This structure is filled in with the address of the peer socket, as known to the communications layer. The exact format of the address returned addr is determined by the socket's address
sockaddr:
- code for the address format. On this version only AF_INET is supported.
- socket address, the length depends on the code format |
| [out] | addrlen | The addrlen argument is a value-result argument: it should initially contain the size of the structure pointed to by addr |
- Returns
- On success, a socket handle.
On a non-blocking accept a possible negative value is SL_EAGAIN.
On failure, negative error code.
SL_POOL_IS_EMPTY may be return in case there are no resources in the system In this case try again later or increase MAX_CONCURRENT_ACTIONS
- See also
- sl_Socket sl_Bind sl_Listen
- Note
- Belongs to server_side
- Warning
| _i16 sl_Connect |
( |
_i16 |
sd, |
|
|
const SlSockAddr_t * |
addr, |
|
|
_i16 |
addrlen |
|
) |
| |
Initiate a connection on a socket.
Function connects the socket referred to by the socket descriptor sd, to the address specified by addr. The addrlen argument specifies the size of addr. The format of the address in addr is determined by the address space of the socket. If it is of type SOCK_DGRAM, this call specifies the peer with which the socket is to be associated; this address is that to which datagrams are to be sent, and the only address from which datagrams are to be received. If the socket is of type SOCK_STREAM, this call attempts to make a connection to another socket. The other socket is specified by address, which is an address in the communications space of the socket.
- Parameters
-
| [in] | sd | Socket descriptor (handle) |
| [in] | addr | Specifies the destination addr
sockaddr:
- code for the address format. On this version only AF_INET is supported.
- socket address, the length depends on the code format |
| [in] | addrlen | Contains the size of the structure pointed to by addr |
- Returns
- On success, a socket handle.
On a non-blocking connect a possible negative value is SL_EALREADY. On failure, negative value.
SL_POOL_IS_EMPTY may be return in case there are no resources in the system In this case try again later or increase MAX_CONCURRENT_ACTIONS
- See also
- sl_Socket
- Note
- belongs to client_side
- Warning
| _i16 sl_GetSockOpt |
( |
_i16 |
sd, |
|
|
_i16 |
level, |
|
|
_i16 |
optname, |
|
|
void * |
optval, |
|
|
SlSocklen_t * |
optlen |
|
) |
| |
Get socket options.
This function manipulate the options associated with a socket. Options may exist at multiple protocol levels; they are always present at the uppermost socket level.
When manipulating socket options the level at which the option resides and the name of the option must be specified. To manipulate options at the socket level, level is specified as SOL_SOCKET. To manipulate options at any other level the protocol number of the appropriate proto- col controlling the option is supplied. For example, to indicate that an option is to be interpreted by the TCP protocol, level should be set to the protocol number of TCP;
The parameters optval and optlen are used to access optval - ues for setsockopt(). For getsockopt() they identify a buffer in which the value for the requested option(s) are to be returned. For getsockopt(), optlen is a value-result parameter, initially containing the size of the buffer pointed to by option_value, and modified on return to indicate the actual size of the value returned. If no option value is to be supplied or returned, option_value may be NULL.
- Parameters
-
| [in] | sd | Socket handle |
| [in] | level | Defines the protocol level for this option |
| [in] | optname | defines the option name to interrogate |
| [out] | optval | Specifies a value for the option |
| [out] | optlen | Specifies the length of the option value |
- Returns
- Zero on success, or negative error code on failure
- See also
- sl_SetSockOpt
- Note
- See sl_SetSockOpt Belongs to ext_api
- Warning
Monitor socket activity.
Select allow a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become "ready" for some class of I/O operation. If trigger mode is enabled the active fdset is the one that retreived in the first triggerd call. To enable the trigger mode, an handler must be statically registered to the slcb_SocketTriggerEventHandler (user.h)
- Parameters
-
| [in] | nfds | The highest-numbered file descriptor in any of the three sets, plus 1. |
| [out] | readsds | Socket descriptors list for read monitoring and accept monitoring |
| [out] | writesds | Socket descriptors list for connect monitoring only, write monitoring is not supported |
| [out] | exceptsds | Socket descriptors list for exception monitoring, not supported. |
| [in] | timeout | Is an upper bound on the amount of time elapsed before select() returns. Null or above 0xffff seconds means infinity timeout. The minimum timeout is 10 milliseconds, less than 10 milliseconds will be set automatically to 10 milliseconds. Max microseconds supported is 0xfffc00. In trigger mode the timout fields must be set to zero. |
- Returns
- On success, select() returns the number of file descriptors contained in the three returned descriptor sets (that is, the total number of bits that are set in readfds, writefds, exceptfds) which may be zero if the timeout expires before anything interesting happens.
On error, a negative value is returned. readsds - return the sockets on which Read request will return without delay with valid data.
writesds - return the sockets on which Write request will return without delay.
exceptsds - return the sockets closed recently.
SL_POOL_IS_EMPTY may be return in case there are no resources in the system In this case try again later or increase MAX_CONCURRENT_ACTIONS
- See also
- sl_Socket
- Note
- If the timeout value set to less than 10ms it will automatically set to 10ms to prevent overload of the system
Belongs to basic_api
Only one sl_Select can be handled at a time.Calling this API while the same command is called from another thread, may result in one of the following scenarios:
- The command will wait (internal) until the previous command finish, and then be executed.
- There are not enough resources and SL_POOL_IS_EMPTY error will return. In this case, MAX_CONCURRENT_ACTIONS can be increased (result in memory increase) or try again later to issue the command.
- In case there is already a triggered sl_Select in progress, the following call will return with SL_RET_CODE_SOCKET_SELECT_IN_PROGRESS_ERROR.
- Warning
| _i16 sl_SetSockOpt |
( |
_i16 |
sd, |
|
|
_i16 |
level, |
|
|
_i16 |
optname, |
|
|
const void * |
optval, |
|
|
SlSocklen_t |
optlen |
|
) |
| |
Set socket options-.
This function manipulate the options associated with a socket.
Options may exist at multiple protocol levels; they are always present at the uppermost socket level.
When manipulating socket options the level at which the option resides and the name of the option must be specified. To manipulate options at the socket level, level is specified as SOL_SOCKET. To manipulate options at any other level the protocol number of the appropriate proto- col controlling the option is supplied. For example, to indicate that an option is to be interpreted by the TCP protocol, level should be set to the protocol number of TCP;
The parameters optval and optlen are used to access optval - ues for setsockopt(). For getsockopt() they identify a buffer in which the value for the requested option(s) are to be returned. For getsockopt(), optlen is a value-result parameter, initially containing the size of the buffer pointed to by option_value, and modified on return to indicate the actual size of the value returned. If no option value is to be supplied or returned, option_value may be NULL.
- Parameters
-
| [in] | sd | Socket handle |
| [in] | level | Defines the protocol level for this option
- SL_SOL_SOCKET Socket level configurations (L4, transport layer)
- SL_IPPROTO_IP IP level configurations (L3, network layer)
- SL_SOL_PHY_OPT Link level configurations (L2, link layer)
|
| [in] | optname | Defines the option name to interrogate
- SL_SOL_SOCKET
- SL_SO_KEEPALIVE
Enable/Disable periodic keep alive. Keeps TCP connections active by enabling the periodic transmission of messages
Timeout is 5 minutes.
Default: Enabled
This options takes SlSockKeepalive_t struct as parameter
- SL_SO_KEEPALIVETIME
Set keep alive timeout. Value is in seconds
Default: 5 minutes
- SL_SO_RX_NO_IP_BOUNDARY
Enable/Disable rx ip boundary. In connectionless socket (udp/raw), unread data is dropped (when recvfrom len parameter < data size), Enable this option in order to read the left data on the next recvfrom iteration Default: Disabled, IP boundary kept,
This options takes SlSockRxNoIpBoundary_t struct as parameter
- SL_SO_RCVTIMEO
Sets the timeout value that specifies the maximum amount of time an input function waits until it completes.
Default: No timeout
This options takes SlTimeval_t struct as parameter
- SL_SO_RCVBUF
Sets tcp max recv window size.
This options takes SlSockWinsize_t struct as parameter
- SL_SO_NONBLOCKING
Sets socket to non-blocking operation Impacts: connect, accept, send, sendto, recv and recvfrom.
Default: Blocking. This options takes SlSockNonblocking_t struct as parameter
- SL_SO_SECMETHOD
Sets method to tcp secured socket (SL_SEC_SOCKET)
Default: SL_SO_SEC_METHOD_SSLv3_TLSV1_2
This options takes SlSockSecureMethod_t struct as parameter
- SL_SO_SECURE_MASK
Sets specific cipher to tcp secured socket (SL_SEC_SOCKET)
Default: "Best" cipher suitable to method
This options takes SlSockSecureMask_t struct as parameter
- SL_SO_SECURE_FILES_CA_FILE_NAME
Map secured socket to CA file by name
This options takes _u8 buffer as parameter
- SL_SO_SECURE_FILES_PRIVATE_KEY_FILE_NAME
Map secured socket to private key by name
This options takes _u8 buffer as parameter
- SL_SO_SECURE_FILES_CERTIFICATE_FILE_NAME
Map secured socket to certificate file by name
This options takes _u8 buffer as parameter
- SL_SO_SECURE_FILES_DH_KEY_FILE_NAME
Map secured socket to Diffie Hellman file by name
This options takes _u8 buffer as parameter
- SL_SO_CHANGE_CHANNEL
Sets channel in transceiver mode. This options takes _u32 as channel number parameter
- SL_SO_SECURE_ALPN
Sets the ALPN list. the parameter is a bit map consist of or of the following values - SL_SECURE_ALPN_H1 SL_SECURE_ALPN_H2 SL_SECURE_ALPN_H2C SL_SECURE_ALPN_H2_14 SL_SECURE_ALPN_H2_16 SL_SECURE_ALPN_FULL_LIST
- SL_IPPROTO_IP
- SL_IP_MULTICAST_TTL
Set the time-to-live value of outgoing multicast packets for this socket.
This options takes _u8 as parameter
- SL_IP_ADD_MEMBERSHIP
UDP socket, Join a multicast group.
This options takes SlSockIpMreq_t struct as parameter
- SL_IP_DROP_MEMBERSHIP
UDP socket, Leave a multicast group
This options takes SlSockIpMreq_t struct as parameter
- SL_IP_RAW_RX_NO_HEADER
Raw socket remove IP header from received data.
Default: data includes ip header
This options takes _u32 as parameter
- SL_IP_HDRINCL
RAW socket only, the IPv4 layer generates an IP header when sending a packet unless
the IP_HDRINCL socket option is enabled on the socket.
When it is enabled, the packet must contain an IP header.
Default: disabled, IPv4 header generated by Network Stack
This options takes _u32 as parameter
- SL_IP_RAW_IPV6_HDRINCL (inactive)
RAW socket only, the IPv6 layer generates an IP header when sending a packet unless
the IP_HDRINCL socket option is enabled on the socket. When it is enabled, the packet must contain an IP header
Default: disabled, IPv4 header generated by Network Stack
This options takes _u32 as parameter
- SL_SOL_PHY_OPT
- SL_SO_PHY_RATE
RAW socket, set WLAN PHY transmit rate
The values are based on SlWlanRateIndex_e
This options takes _u32 as parameter
- SL_SO_PHY_TX_POWER
RAW socket, set WLAN PHY TX power
Valid rage is 1-15
This options takes _u32 as parameter
- SL_SO_PHY_NUM_FRAMES_TO_TX
RAW socket, set number of frames to transmit in transceiver mode. Default: 1 packet This options takes _u32 as parameter
- SL_SO_PHY_PREAMBLE
RAW socket, set WLAN PHY preamble for Long/Short
This options takes _u32 as parameter
- SL_SO_PHY_TX_INHIBIT_THRESHOLD
RAW socket, set WLAN Tx – Set CCA threshold.
The values are based on SlTxInhibitThreshold_e
This options takes _u32 as parameter
- SL_SO_PHY_TX_TIMEOUT
RAW socket, set WLAN Tx – changes the TX timeout (lifetime) of transceiver frames.
Value in Ms, maximum value is 10ms
This options takes _u32 as parameter
- SL_SO_PHY_ALLOW_ACKS
RAW socket, set WLAN Tx – Enable sending ACKs in transceiver mode
0 = disabled / 1 = enabled
This options takes _u32 as parameter
- SL_SO_LINGER
Socket lingers on close pending remaining send/receive packetst
- SL_SO_SECURE_EXT_CLIENT_CHLNG_RESP
Set with no parameter to indicate that the client uses external signature using netapp requesrt.
needs netapp request handler
- SL_SO_SECURE_DOMAIN_NAME_VERIFICATION
Set a domain name, to check in ssl client connection.
|
| [in] | optval | Specifies a value for the option |
| [in] | optlen | Specifies the length of the option value |
- Returns
- Zero on success, or negative error code on failure
- Persistent
- All params are Non- Persistent
- See also
- sl_getsockopt
- Note
- Belongs to basic_api
- Warning
- Examples
- SL_SO_KEEPALIVE (disable Keepalive):
1 SlSockKeepalive_t enableOption;
2 enableOption.KeepaliveEnabled = 0;
3 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_KEEPALIVE, (_u8 *)&enableOption,sizeof(enableOption));
- SL_SO_KEEPALIVETIME (Set Keepalive timeout):
3 sl_SetSockOpt(Sd, SL_SOL_SOCKET, SL_SO_KEEPALIVETIME,( _u8*) &TimeOut, sizeof(TimeOut));
- SL_SO_RX_NO_IP_BOUNDARY (disable boundary):
1 SlSockRxNoIpBoundary_t enableOption;
2 enableOption.RxIpNoBoundaryEnabled = 1;
3 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_RX_NO_IP_BOUNDARY, (_u8 *)&enableOption,sizeof(enableOption));
- SL_SO_RCVTIMEO:
1 struct SlTimeval_t timeVal;
2 timeVal.tv_sec = 1; // Seconds
3 timeVal.tv_usec = 0; // Microseconds. 10000 microseconds resolution
4 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_RCVTIMEO, (_u8 *)&timeVal, sizeof(timeVal)); // Enable receive timeout
- SL_SO_RCVBUF:
2 size.Winsize = 3000; // bytes
3 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_RCVBUF, (_u8 *)&size, sizeof(size));
- SL_SO_NONBLOCKING:
1 SlSockNonblocking_t enableOption;
2 enableOption.NonblockingEnabled = 1;
3 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_NONBLOCKING, (_u8 *)&enableOption,sizeof(enableOption)); // Enable/disable nonblocking mode
- SL_SO_SECMETHOD:
1 SlSockSecureMethod_t method;
2 method.SecureMethod = SL_SO_SEC_METHOD_SSLV3; // security method we want to use
3 SockID = sl_Socket(SL_AF_INET,SL_SOCK_STREAM, SL_SEC_SOCKET);
4 sl_SetSockOpt(SockID, SL_SOL_SOCKET, SL_SO_SECMETHOD, (_u8 *)&method, sizeof(method));
- SL_SO_SECURE_MASK:
1 SlSockSecureMask_t cipher;
2 cipher.SecureMask = SL_SEC_MASK_SSL_RSA_WITH_RC4_128_SHA; // cipher type
3 SockID = sl_Socket(SL_AF_INET,SL_SOCK_STREAM, SL_SEC_SOCKET);
4 sl_SetSockOpt(SockID, SL_SOL_SOCKET, SL_SO_SECURE_MASK,(_u8 *)&cipher, sizeof(cipher));
- SL_SO_SECURE_FILES_CA_FILE_NAME:
1 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_SECURE_FILES_CA_FILE_NAME,"exuifaxCaCert.der",strlen("exuifaxCaCert.der"));
- SL_SO_SECURE_FILES_PRIVATE_KEY_FILE_NAME;
1 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_SECURE_FILES_PRIVATE_KEY_FILE_NAME,"myPrivateKey.der",strlen("myPrivateKey.der"));
- SL_SO_SECURE_FILES_CERTIFICATE_FILE_NAME:
1 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_SECURE_FILES_CERTIFICATE_FILE_NAME,"myCertificate.der",strlen("myCertificate.der"));
- SL_SO_SECURE_FILES_DH_KEY_FILE_NAME:
1 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_SECURE_FILES_DH_KEY_FILE_NAME,"myDHinServerMode.der",strlen("myDHinServerMode.der"));
- SL_IP_MULTICAST_TTL:
2 sl_SetSockOpt(SockID, SL_IPPROTO_IP, SL_IP_MULTICAST_TTL, &ttl, sizeof(ttl));
- SL_IP_ADD_MEMBERSHIP:
2 sl_SetSockOpt(SockID, SL_IPPROTO_IP, SL_IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
- SL_IP_DROP_MEMBERSHIP:
2 sl_SetSockOpt(SockID, SL_IPPROTO_IP, SL_IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
- SL_SO_CHANGE_CHANNEL:
1 _u32 newChannel = 6; // range is 1-13
2 sl_SetSockOpt(SockID, SL_SOL_SOCKET, SL_SO_CHANGE_CHANNEL, &newChannel, sizeof(newChannel));
- SL_SO_SECURE_ALPN:
1 SlSockSecureALPN_t alpn;
2 alpn.SecureALPN = SL_SECURE_ALPN_H2 | SL_SECURE_ALPN_H2_14;
3 sl_SetSockOpt(SockID, SL_SOL_SOCKET, SL_SO_SECURE_ALPN, &alpn, sizeof(SlSockSecureALPN_t));
- SL_IP_RAW_RX_NO_HEADER:
1 _u32 header = 1; // remove ip header
2 sl_SetSockOpt(SockID, SL_IPPROTO_IP, SL_IP_RAW_RX_NO_HEADER, &header, sizeof(header));
- SL_IP_HDRINCL:
2 sl_SetSockOpt(SockID, SL_IPPROTO_IP, SL_IP_HDRINCL, &header, sizeof(header));
- SL_IP_RAW_IPV6_HDRINCL:
2 sl_SetSockOpt(SockID, SL_IPPROTO_IP, SL_IP_RAW_IPV6_HDRINCL, &header, sizeof(header));
- SL_SO_PHY_RATE:
1 _u32 rate = 6; // see wlan.h SlWlanRateIndex_e for values
2 sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_RATE, &rate, sizeof(rate));
- SL_SO_PHY_TX_POWER:
1 _u32 txpower = 1; // valid range is 1-15
2 sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_TX_POWER, &txpower, sizeof(txpower));
- SL_SO_PHY_NUM_FRAMES_TO_TX:
2 sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_NUM_FRAMES_TO_TX, &numframes, sizeof(numframes));
- SL_SO_PHY_PREAMBLE:
2 sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_PREAMBLE, &preamble, sizeof(preamble));
- SL_SO_PHY_TX_INHIBIT_THRESHOLD:
1 _u32 thrshld = SL_TX_INHIBIT_THRESHOLD_MED;
2 sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_TX_INHIBIT_THRESHOLD , &thrshld, sizeof(thrshld));
- SL_SO_PHY_TX_TIMEOUT:
2 sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_TX_TIMEOUT , &timeout, sizeof(timeout));
- SL_SO_PHY_ALLOW_ACKS:
1 _u32 acks = 1; // 0 = disabled / 1 = enabled
2 sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_ALLOW_ACKS, &acks, sizeof(acks));
- SL_SO_LINGER:
4 sl_SetSockOpt(SockID, SL_SOL_SOCKET, SL_SO_LINGER, &linger, sizeof(linger));
- SL_SO_SECURE_EXT_CLIENT_CHLNG_RESP:
2 sl_SetSockOpt(SockID, SL_SOL_SOCKET, SL_SO_SECURE_EXT_CLIENT_CHLNG_RESP, &dummy, sizeof(dummy));
- SL_SO_SECURE_DOMAIN_NAME_VERIFICATION:
1 sl_SetSockOpt(SockID,SL_SOL_SOCKET,SL_SO_SECURE_DOMAIN_NAME_VERIFICATION,"www.google.co.il",strlen("www.google.co.il"));